* [PATCH] nmclan_cs: dereferencing skb after netif_rx()
@ 2006-05-30 19:11 Florin Malita
0 siblings, 0 replies; only message in thread
From: Florin Malita @ 2006-05-30 19:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: jgarzik, linux-kernel
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>
---
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index 4260c21..a8f6bfc 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 *de
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 {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-30 19:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-30 19:11 [PATCH] nmclan_cs: dereferencing skb after netif_rx() Florin Malita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox