diff options
author | Florin Malita <fmalita@gmail.com> | 2006-06-04 13:51:26 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-05 23:29:15 +0400 |
commit | 6f258910733a8dbde368acc2ede4b8184ff0e09a (patch) | |
tree | 1c56af63b46fc80a8ebe509c0be1deb94f2f5849 /drivers | |
parent | 50ff06d1546d7f492068dd5196c26bf2cc5080b1 (diff) | |
download | linux-6f258910733a8dbde368acc2ede4b8184ff0e09a.tar.xz |
[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')
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 4260c2128f47..a8f6bfc96fd2 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 { |