[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080827220549.GS11734@cs181140183.pp.htv.fi>
Date: Thu, 28 Aug 2008 01:05:49 +0300
From: Adrian Bunk <bunk@...nel.org>
To: Krzysztof HaĆasa <khc@...waw.pl>,
Jeff Garzik <jgarzik@...hat.com>
Cc: netdev@...r.kernel.org
Subject: [2.6 patch] wan/hdlc_x25.c: fix a NULL dereference
I doubt stats matter much in this case, and this anyway was a
NULL dereference.
Reported-by: Adrian Bunk <bunk@...nel.org>
Signed-off-by: Adrian Bunk <bunk@...nel.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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists