Skip to content

Commit

Permalink
mac80211: Fix scan RX processing oops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Oct 15, 2008
1 parent c25bab5 commit d048e50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d048e50

Please sign in to comment.