svn commit: r297287 - head/sys/net80211
Andriy Voskoboinyk
avos at FreeBSD.org
Sat Mar 26 08:59:57 UTC 2016
Author: avos
Date: Sat Mar 26 08:59:56 2016
New Revision: 297287
URL: https://svnweb.freebsd.org/changeset/base/297287
Log:
net80211: fix panic for DWDS vaps
Since r248069, TX IC lock must obtained before calling ieee80211_encap()
and/or ieee80211_parent_xmitpkt().
Tested with: Intel 3945BG.
Modified:
head/sys/net80211/ieee80211_wds.c
Modified: head/sys/net80211/ieee80211_wds.c
==============================================================================
--- head/sys/net80211/ieee80211_wds.c Sat Mar 26 06:59:01 2016 (r297286)
+++ head/sys/net80211/ieee80211_wds.c Sat Mar 26 08:59:56 2016 (r297287)
@@ -288,9 +288,11 @@ ieee80211_dwds_mcast(struct ieee80211vap
/*
* Encapsulate the packet in prep for transmission.
*/
+ IEEE80211_TX_LOCK(ic);
mcopy = ieee80211_encap(vap, ni, mcopy);
if (mcopy == NULL) {
/* NB: stat+msg handled in ieee80211_encap */
+ IEEE80211_TX_UNLOCK(ic);
ieee80211_free_node(ni);
continue;
}
@@ -298,6 +300,7 @@ ieee80211_dwds_mcast(struct ieee80211vap
mcopy->m_pkthdr.rcvif = (void *) ni;
err = ieee80211_parent_xmitpkt(ic, mcopy);
+ IEEE80211_TX_UNLOCK(ic);
if (!err) {
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1);
More information about the svn-src-all
mailing list