linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 3c589_cs: don't reference skb after passing it to netif_rx
@ 2001-02-27  0:10 Arnaldo Carvalho de Melo
  2001-02-27  1:56 ` Jeff Garzik
  2001-02-27  2:07 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-02-27  0:10 UTC (permalink / raw)
  To: Alan Cox, dahinds, linux-kernel

now to pcmcia ones

Em Mon, Feb 26, 2001 at 08:33:59PM -0300, Arnaldo Carvalho de Melo escreveu:
Hi,

	I've just read davem's post at netdev about the brokeness of
referencing skbs after passing it to netif_rx, so please consider applying
this patch. Ah, this was just added to the Janitor's TODO list at
http://bazar.conectiva.com.br/~acme/TODO and I'm doing a quick audit in the
net drivers searching for this, maybe some more patches will follow.

- Arnaldo

--- linux-2.4.2/drivers/net/pcmcia/3c589_cs.c	Tue Feb 13 19:15:05 2001
+++ linux-2.4.2.acme/drivers/net/pcmcia/3c589_cs.c	Mon Feb 26 22:44:00 2001
@@ -992,9 +992,9 @@
 			(pkt_len+3)>>2);
 		skb->protocol = eth_type_trans(skb, dev);
 		
+		lp->stats.rx_bytes += skb->len;
 		netif_rx(skb);
 		lp->stats.rx_packets++;
-		lp->stats.rx_bytes += skb->len;
 	    } else {
 		DEBUG(1, "%s: couldn't allocate a sk_buff of"
 		      " size %d.\n", dev->name, pkt_len);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-02-27  2:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-27  0:10 [PATCH] 3c589_cs: don't reference skb after passing it to netif_rx Arnaldo Carvalho de Melo
2001-02-27  1:56 ` Jeff Garzik
2001-02-27  0:26   ` Arnaldo Carvalho de Melo
2001-02-27  2:07 ` Jeff Garzik
2001-02-27  0:32   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).