diff options
author | Florin Malita <fmalita@gmail.com> | 2006-06-04 11:51:26 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-05 21:29:15 +0200 |
commit | 6f258910733a8dbde368acc2ede4b8184ff0e09a (patch) | |
tree | 1c56af63b46fc80a8ebe509c0be1deb94f2f5849 /drivers/net/pcmcia | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 (diff) | |
download | linux-6f258910733a8dbde368acc2ede4b8184ff0e09a.tar.xz linux-6f258910733a8dbde368acc2ede4b8184ff0e09a.zip |
[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.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 { |