netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] wan/hdlc_x25.c: fix a NULL dereference
@ 2008-08-27 22:05 Adrian Bunk
  2008-08-29  7:08 ` Herbert Xu
  2008-08-31 17:08 ` Krzysztof Halasa
  0 siblings, 2 replies; 7+ messages in thread
From: Adrian Bunk @ 2008-08-27 22:05 UTC (permalink / raw)
  To: Krzysztof Hałasa, Jeff Garzik; +Cc: netdev

I doubt stats matter much in this case, and this anyway was a
NULL dereference.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
28711620a5326efc71d5228eeff5a28fed9355be 
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index 8b7e5d2..7599e37 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -163,10 +163,8 @@ static void x25_close(struct net_device *dev)
 
 static int x25_rx(struct sk_buff *skb)
 {
-	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
-		skb->dev->stats.rx_dropped++;
+	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
 		return NET_RX_DROP;
-	}
 
 	if (lapb_data_received(skb->dev, skb) == LAPB_OK)
 		return NET_RX_SUCCESS;


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

end of thread, other threads:[~2008-09-13 19:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-27 22:05 [2.6 patch] wan/hdlc_x25.c: fix a NULL dereference Adrian Bunk
2008-08-29  7:08 ` Herbert Xu
2008-08-31 17:08 ` Krzysztof Halasa
2008-09-03 14:12   ` Jeff Garzik
2008-09-03 16:14     ` Krzysztof Halasa
2008-09-03 16:21       ` Krzysztof Halasa
2008-09-13 19:56         ` Jeff Garzik

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