From owner-svn-src-all@FreeBSD.ORG Wed Aug 12 21:55:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BAD106566C; Wed, 12 Aug 2009 21:55:47 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 534F38FC4A; Wed, 12 Aug 2009 21:55:47 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E762A46B37; Wed, 12 Aug 2009 17:55:46 -0400 (EDT) Date: Wed, 12 Aug 2009 22:55:46 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Sam Leffler In-Reply-To: <200908122119.n7CLJJlk077111@svn.freebsd.org> Message-ID: References: <200908122119.n7CLJJlk077111@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196159 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:55:47 -0000 On Wed, 12 Aug 2009, Sam Leffler wrote: > Drain link state event changes posted during vap destroy. This is a > band-aid for the general problem that if_link_state_change can be > called between if_detach and if_free leaving a task queued that has > been free'd. FYI to others -- we believe the proper fix should be in the ifnet framework, but this change was the lowest-risk way to resolve the problem for 8.0. Following the release we'll investigate having the ifnet framework provide this protection automatically for drivers. Robert N M Watson Computer Laboratory University of Cambridge > Spotted by: thompsa > Reviewed by: rwatson > Approved by: re (rwatson) > > Modified: > head/sys/net80211/ieee80211.c > > Modified: head/sys/net80211/ieee80211.c > ============================================================================== > --- head/sys/net80211/ieee80211.c Wed Aug 12 21:06:43 2009 (r196158) > +++ head/sys/net80211/ieee80211.c Wed Aug 12 21:19:19 2009 (r196159) > @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap > > /* > * Flush any deferred vap tasks. > - * NB: must be before ether_ifdetach() and removal from ic_vaps list > */ > ieee80211_draintask(ic, &vap->iv_nstate_task); > ieee80211_draintask(ic, &vap->iv_swbmiss_task); > > + /* XXX band-aid until ifnet handles this for us */ > + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); > + > IEEE80211_LOCK(ic); > KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); > TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); >