From owner-svn-src-head@freebsd.org Wed Sep 16 07:28:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A9E09CE726; Wed, 16 Sep 2015 07:28:16 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E64E10BD; Wed, 16 Sep 2015 07:28:14 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.9/8.14.9) with ESMTP id t8G7RmjV030076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Sep 2015 15:27:49 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.9/8.14.9/Submit) id t8G7RmAs030075; Wed, 16 Sep 2015 15:27:48 +0800 (CST) (envelope-from kevlo) Date: Wed, 16 Sep 2015 15:27:47 +0800 From: Kevin Lo To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287852 - head/sys/dev/usb/wlan Message-ID: <20150916072747.GA30042@ns.kevlo.org> References: <201509160716.t8G7GM9v047729@repo.freebsd.org> <20150916072002.GA32476@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150916072002.GA32476@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2015 07:28:16 -0000 On Wed, Sep 16, 2015 at 09:20:02AM +0200, Mateusz Guzik wrote: > On Wed, Sep 16, 2015 at 07:16:22AM +0000, Kevin Lo wrote: > > Author: kevlo > > Date: Wed Sep 16 07:16:21 2015 > > New Revision: 287852 > > URL: https://svnweb.freebsd.org/changeset/base/287852 > > > > Log: > > Remove checks for a NULL return value from M_WAITOK allocations. > > > > Modified: > > head/sys/dev/usb/wlan/if_ural.c > > > > Modified: head/sys/dev/usb/wlan/if_ural.c > > ============================================================================== > > --- head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 06:23:15 2015 (r287851) > > +++ head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 07:16:21 2015 (r287852) > > @@ -566,10 +566,7 @@ ural_vap_create(struct ieee80211com *ic, > > > > if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ > > return NULL; > > - uvp = (struct ural_vap *) malloc(sizeof(struct ural_vap), > > - M_80211_VAP, M_NOWAIT | M_ZERO); > > - if (uvp == NULL) > > - return NULL; > > + uvp = malloc(sizeof(struct ural_vap), M_80211_VAP, M_NOWAIT | M_ZERO); > > vap = &uvp->vap; > > /* enable s/w bmiss handling for sta mode */ > > > > > > This looks like M_NOWAIT prior to and after the commit. > > I have no idea if the context here allows sleeping though. Thanks for spotting this out. This functionality is not used within interrupt context, so we could use M_WAITOK to allocate memory. > > -- > Mateusz Guzik Kevin