linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] de4x5.c: don't reference skb after passing it to netif_rx
@ 2001-02-26 23:33 Arnaldo Carvalho de Melo
  2001-02-26 23:39 ` [PATCH] defxx.c: " Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-02-26 23:33 UTC (permalink / raw)
  To: Alan Cox, davies; +Cc: linux-kernel

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/de4x5.c	Fri Feb  9 17:40:02 2001
+++ linux-2.4.2.acme/drivers/net/de4x5.c	Mon Feb 26 22:02:50 2001
@@ -1731,13 +1731,13 @@
 
 		    /* Push up the protocol stack */
 		    skb->protocol=eth_type_trans(skb,dev);
+		    de4x5_local_stats(dev, skb->data, pkt_len);
 		    netif_rx(skb);
 		    
 		    /* Update stats */
 		    dev->last_rx = jiffies;
 		    lp->stats.rx_packets++;
  		    lp->stats.rx_bytes += pkt_len;
-		    de4x5_local_stats(dev, skb->data, pkt_len);
 		}
 	    }
 	    

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-26 23:33 [PATCH] de4x5.c: don't reference skb after passing it to netif_rx Arnaldo Carvalho de Melo
2001-02-26 23:39 ` [PATCH] defxx.c: " 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).