Skip to content

Commit

Permalink
[PATCH] nmclan_cs: dereferencing skb after netif_rx()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florin Malita authored and Linus Torvalds committed Jun 5, 2006
1 parent 50ff06d commit 6f25891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/pcmcia/nmclan_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6f25891

Please sign in to comment.