linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Fix scan RX processing oops
@ 2008-10-11  0:29 Jouni Malinen
  2008-10-11  0:38 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Jouni Malinen @ 2008-10-11  0:29 UTC (permalink / raw)
  To: Johannes Berg, John Linville; +Cc: linux-wireless

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>


Index: wireless-testing/net/mac80211/scan.c
===================================================================
--- wireless-testing.orig/net/mac80211/scan.c
+++ wireless-testing/net/mac80211/scan.c
@@ -388,7 +388,8 @@ ieee80211_scan_rx(struct ieee80211_sub_i
 	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;

-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-14 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-11  0:29 [PATCH] mac80211: Fix scan RX processing oops Jouni Malinen
2008-10-11  0:38 ` Johannes Berg
2008-10-11  0:48   ` Jouni Malinen
2008-10-11  0:53     ` Johannes Berg
2008-10-14 19:20       ` Benoit PAPILLAULT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).