fmvj18x_cs: don't reference skb after passing it to netif_rx
Subsystems (2)
PATCH 1/1 fmvj18x_cs: don't reference skb after passing it to netif_rx
another pcmcia one
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
drivers/net/pcmcia/fmvj18x_cs.c +1 -1
@@ -994,9 +994,9 @@ }#endif + lp->stats.rx_bytes += skb->len;netif_rx (skb); lp->stats.rx_packets++; - lp->stats.rx_bytes += skb->len; }if (--boguscount <=0 )break ;
Ditto...
Signature · 3 lines
Jeff Garzik | "You see, in this world there's two kinds of Building 1024 | people, my friend: Those with loaded guns MandrakeSoft | and those who dig. You dig." --Blondie
Index: drivers/net/pcmcia/fmvj18x_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/fmvj18x_cs.c,v retrieving revision 1.1.1.14.2.2
net/pcmcia/fmvj18x_cs.c +2 -1
@@ -1080,8 +1080,9 @@#endif netif_rx (skb); + dev->last_rx = jiffies; lp->stats.rx_packets++; - lp->stats.rx_bytes += skb->len; + lp->stats.rx_bytes += pkt_len; }if (--boguscount <=0 )break ;
Em Mon, Feb 26, 2001 at 08:57:37PM -0500, Jeff Garzik escreveu:
Quoted 1 line
Ditto...
thanks, as I said to Donald, I was in fast mode, so the driver maintainers should take this into account and use my previous patches as a hint, I'm considering this for the upcoming patches, if there's any more drivers that are broken wrt this bug.
- Arnaldo
PATCH 1/1 tms380tr: update last_rx after netif_rx
In reply to Arnaldo Carvalho de MeloHi,
Please consider applying.
- Arnaldo
drivers/net/tokenring/tms380tr.c +1 -0
@@ -2203,6 +2203,7 @@skb_trim (skb,Length); skb->protocol =tr_type_trans (skb,dev);netif_rx (skb); + dev->last_rx = jiffies; } }else /* Invalid frame */