diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-10-11 15:10:40 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-12 15:55:53 -0400 |
commit | d20ef63d32461332958661df73e21c0ca42601b0 (patch) | |
tree | b63f50f6086cacd9597490459f9febe289ba8c0d /net/mac80211/rx.c | |
parent | edbfdcceb41c0cbfc1dd2cd28af2272190be47ad (diff) | |
download | kernel_samsung_aries-d20ef63d32461332958661df73e21c0ca42601b0.zip kernel_samsung_aries-d20ef63d32461332958661df73e21c0ca42601b0.tar.gz kernel_samsung_aries-d20ef63d32461332958661df73e21c0ca42601b0.tar.bz2 |
mac80211: document ieee80211_rx() context requirement
ieee80211_rx() must be called with softirqs disabled
since the networking stack requires this for netif_rx()
and some code in mac80211 can assume that it can not
be processing its own tasklet and this call at the same
time.
It may be possible to remove this requirement after a
careful audit of mac80211 and doing any needed locking
improvements in it along with disabling softirqs around
netif_rx(). An alternative might be to push all packet
processing to process context in mac80211, instead of
to the tasklet, and add other synchronisation.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 865fbc0..7170bf4 100644 --- a/net/mac80211/rx.c +++ b/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; |