linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2x00: Fix NULL pointer error in adhoc/master mode
@ 2008-07-05 13:11 Ivo van Doorn
  2008-07-05 18:33 ` [Rt2400-devel] " Bryan Batten
  0 siblings, 1 reply; 14+ messages in thread
From: Ivo van Doorn @ 2008-07-05 13:11 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel

As soon as an interface is enabled, and that interface is in adhoc or master mode,
the device will start raising beacondone interrupts. But before the first interrupt is
raised, mac80211 will probably not have send any beacons to the device yet, which
results in a NULL pointer error when the skb is being freed.

Note that the "raise beacondone interrupts without a beacon" is also a bug,
and will be addressed later. The more important bug however is preventing
the NULL pointer failt itself, since there might be other conditions that could trigger
it as well.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 8e86611..a9aa0d5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -107,6 +107,9 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
 
 void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
 {
+	if (!skb)
+		return;
+
 	rt2x00queue_unmap_skb(rt2x00dev, skb);
 	dev_kfree_skb_any(skb);
 }

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

end of thread, other threads:[~2008-07-09 18:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-05 13:11 [PATCH] rt2x00: Fix NULL pointer error in adhoc/master mode Ivo van Doorn
2008-07-05 18:33 ` [Rt2400-devel] " Bryan Batten
2008-07-05 18:42   ` Ivo van Doorn
2008-07-05 18:43     ` Johannes Berg
2008-07-05 19:26       ` Ivo van Doorn
2008-07-05 19:22         ` Johannes Berg
2008-07-05 19:37           ` Ivo van Doorn
2008-07-05 19:37             ` Johannes Berg
2008-07-05 21:17               ` Ivo van Doorn
2008-07-05 20:25     ` Bryan Batten
2008-07-05 21:19       ` Ivo van Doorn
2008-07-09 17:59     ` Bryan Batten
2008-07-09 18:29       ` Ivo van Doorn
2008-07-09 18:33         ` Bryan Batten

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).