Author: avos
Date: Fri Mar 24 22:29:51 2017
New Revision: 315917
URL: https://svnweb.freebsd.org/changeset/base/315917

Log:
  net80211: fix possible panic when wlan(4) interface is destroyed.
  
  If this is the last running vap wait until device will be powered off
  (fixes panic when 'ifconfig wlan0 destroy' is executed for running iwn(4)
  interface).
  
  Tested with:
   - Intel 6205, STA mode.
   - RTL8188EU, STA / IBSS modes.
   - RTL8821AU, STA / HOSTAP modes.

Modified:
  head/sys/net80211/ieee80211.c

Modified: head/sys/net80211/ieee80211.c
==============================================================================
--- head/sys/net80211/ieee80211.c       Fri Mar 24 18:28:48 2017        
(r315916)
+++ head/sys/net80211/ieee80211.c       Fri Mar 24 22:29:51 2017        
(r315917)
@@ -728,6 +728,7 @@ ieee80211_vap_detach(struct ieee80211vap
        ieee80211_draintask(ic, &vap->iv_nstate_task);
        ieee80211_draintask(ic, &vap->iv_swbmiss_task);
        ieee80211_draintask(ic, &vap->iv_wme_task);
+       ieee80211_draintask(ic, &ic->ic_parent_task);
 
        /* XXX band-aid until ifnet handles this for us */
        taskqueue_drain(taskqueue_swi, &ifp->if_linktask);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to