aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/pcmcia
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2006-06-04 02:51:26 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-05 12:29:15 -0700
commit6f258910733a8dbde368acc2ede4b8184ff0e09a (patch)
tree1c56af63b46fc80a8ebe509c0be1deb94f2f5849 /drivers/net/pcmcia
parent50ff06d1546d7f492068dd5196c26bf2cc5080b1 (diff)
[PATCH] nmclan_cs: dereferencing skb after netif_rx()
From: Florin Malita <fmalita@gmail.com> The skb may be gone after netif_rx(), we can't use 'skb->len' to update the stats. 'pkt_len' should work instead. Coverity CID: 911. Signed-off-by: Florin Malita <fmalita@gmail.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index 4260c2128f4..a8f6bfc96fd 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -1204,7 +1204,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt)
dev->last_rx = jiffies;
lp->linux_stats.rx_packets++;
- lp->linux_stats.rx_bytes += skb->len;
+ lp->linux_stats.rx_bytes += pkt_len;
outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */
continue;
} else {