Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Aug 2009 21:19:19 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r196159 - head/sys/net80211
Message-ID:  <200908122119.n7CLJJlk077111@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Wed Aug 12 21:19:19 2009
New Revision: 196159
URL: http://svn.freebsd.org/changeset/base/196159

Log:
  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.
  
  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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908122119.n7CLJJlk077111>