Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2017 22:29:51 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315917 - head/sys/net80211
Message-ID:  <201703242229.v2OMTpAN032698@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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