From c90529d671c412623b51575f26e1516b7d795f20 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sun, 11 Oct 2009 15:10:40 +0200 Subject: [PATCH] --- yaml --- r: 167548 b: refs/heads/master c: d20ef63d32461332958661df73e21c0ca42601b0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/mac80211.h | 2 ++ trunk/net/mac80211/rx.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a5006cc16d6e..70f3ce0c8a5a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: edbfdcceb41c0cbfc1dd2cd28af2272190be47ad +refs/heads/master: d20ef63d32461332958661df73e21c0ca42601b0 diff --git a/trunk/include/net/mac80211.h b/trunk/include/net/mac80211.h index 466859b285e1..c75b960c8ac8 100644 --- a/trunk/include/net/mac80211.h +++ b/trunk/include/net/mac80211.h @@ -1669,6 +1669,8 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw); * to this function and ieee80211_rx_irqsafe() may not be mixed for a * single hardware. * + * Note that right now, this function must be called with softirqs disabled. + * * @hw: the hardware this frame came in on * @skb: the buffer to receive, owned by mac80211 after this call */ diff --git a/trunk/net/mac80211/rx.c b/trunk/net/mac80211/rx.c index 865fbc09be1a..7170bf4565a8 100644 --- a/trunk/net/mac80211/rx.c +++ b/trunk/net/mac80211/rx.c @@ -2453,6 +2453,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) struct ieee80211_supported_band *sband; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); + WARN_ON_ONCE(softirq_count() == 0); + if (WARN_ON(status->band < 0 || status->band >= IEEE80211_NUM_BANDS)) goto drop;