mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
[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>
This commit is contained in:
parent
50ff06d154
commit
6f25891073
1 changed files with 1 additions and 1 deletions
|
@ -1204,7 +1204,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt)
|
||||||
|
|
||||||
dev->last_rx = jiffies;
|
dev->last_rx = jiffies;
|
||||||
lp->linux_stats.rx_packets++;
|
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 */
|
outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue