1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-31 16:57:10 +00:00

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)
This commit is contained in:
Sam Leffler 2009-08-12 21:19:19 +00:00
parent 692eebe092
commit ab501dd65d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196159

View File

@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap *vap)
/*
* 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);