[PATCH] 3c589_cs: don't reference skb after passing it to netif_rx

From: Arnaldo Carvalho de Melo (acme@conectiva.com.br)
Date: Mon Feb 26 2001 - 19:10:58 EST

now to pcmcia ones

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

        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 @@
                 skb->protocol = eth_type_trans(skb, dev);
+ lp->stats.rx_bytes += skb->len;
- lp->stats.rx_bytes += skb->len;
             } else {
                 DEBUG(1, "%s: couldn't allocate a sk_buff of"
                       " size %d.\n", dev->name, pkt_len);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Wed Feb 28 2001 - 21:00:12 EST