summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-10-11 03:29:55 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-10-14 21:08:11 -0400
commitd048e503a2b01e771ee87921c24d89d7ec3f0c2f (patch)
tree71df617d24f8ba4cc349b3588e9ee87a5b891b7a /net
parentc25bab54fe30d26a2cddf7058d77da72be630b23 (diff)
downloadop-kernel-dev-d048e503a2b01e771ee87921c24d89d7ec3f0c2f.zip
op-kernel-dev-d048e503a2b01e771ee87921c24d89d7ec3f0c2f.tar.gz
mac80211: Fix scan RX processing oops
ieee80211_bss_info_update() can return NULL. Verify that this is not the case before calling ieee802111_rx_bss_put() which would trigger an oops in interrupt context in atomic_dec_and_lock(). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benoit Papillault <benoit.papillault@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/scan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 8e6685e..416bb41 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -388,7 +388,8 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
bss = ieee80211_bss_info_update(sdata->local, rx_status,
mgmt, skb->len, &elems,
freq, beacon);
- ieee80211_rx_bss_put(sdata->local, bss);
+ if (bss)
+ ieee80211_rx_bss_put(sdata->local, bss);
dev_kfree_skb(skb);
return RX_QUEUED;
OpenPOWER on IntegriCloud