Skip to contentSkip to conversation

mac80211: fix ieee80211_xmit call context

PATCH New Johannes Berg 1 participant 1 message Jun 18, 2009 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: fix ieee80211_xmit call context

ieee80211_xmit() cannot be called with tasklets enabled because it is normally called from within a tasklet.

---
Fixes a problem with the mdev removal.

 net/mac80211/tx.c |    7 +++++++
 1 file changed, 7 insertions(+)
net/mac80211/tx.c +7 -0
@@ -2221,5 +2221,12 @@ void ieee80211_tx_skb(struct ieee80211_s
 	if (!encrypt)
 		info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
 
+	/*
+	 * The other path calling ieee80211_xmit is from the tasklet,
+	 * and while we can handle concurrent transmissions locking
+	 * requirements are that we do not come into tx with bhs on.
+	 */
+	local_bh_disable();
 	ieee80211_xmit(sdata, skb);
+	local_bh_enable();
 }