linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx
@ 2001-02-27  0:14 Arnaldo Carvalho de Melo
  2001-02-27  0:41 ` [PATCH] tms380tr: update last_rx after netif_rx Arnaldo Carvalho de Melo
  2001-02-27  1:57 ` [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-02-27  0:14 UTC (permalink / raw)
  To: Alan Cox, shingo, linux-kernel

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

--- linux-2.4.2/drivers/net/pcmcia/fmvj18x_cs.c	Tue Feb 13 19:15:05 2001
+++ linux-2.4.2.acme/drivers/net/pcmcia/fmvj18x_cs.c	Mon Feb 26 22:45:53 2001
@@ -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;

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

* Re: [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx
  2001-02-27  1:57 ` [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx Jeff Garzik
@ 2001-02-27  0:25   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-02-27  0:25 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, shingo, linux-kernel

Em Mon, Feb 26, 2001 at 08:57:37PM -0500, Jeff Garzik escreveu:
> 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

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

* [PATCH] tms380tr: update last_rx after netif_rx
  2001-02-27  0:14 [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx Arnaldo Carvalho de Melo
@ 2001-02-27  0:41 ` Arnaldo Carvalho de Melo
  2001-02-27  1:57 ` [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-02-27  0:41 UTC (permalink / raw)
  To: Alan Cox, Jochen Friedrich, linux-kernel

Hi,

	Please consider applying.

- Arnaldo

--- linux-2.4.2/drivers/net/tokenring/tms380tr.c	Fri Feb 16 22:02:36 2001
+++ linux-2.4.2.acme/drivers/net/tokenring/tms380tr.c	Mon Feb 26 23:11:51 2001
@@ -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 */

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

* Re: [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx
  2001-02-27  0:14 [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx Arnaldo Carvalho de Melo
  2001-02-27  0:41 ` [PATCH] tms380tr: update last_rx after netif_rx Arnaldo Carvalho de Melo
@ 2001-02-27  1:57 ` Jeff Garzik
  2001-02-27  0:25   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2001-02-27  1:57 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Alan Cox, shingo, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

Ditto...
-- 
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

[-- Attachment #2: fmv.patch --]
[-- Type: text/plain, Size: 602 bytes --]

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
diff -u -r1.1.1.14.2.2 fmvj18x_cs.c
--- drivers/net/pcmcia/fmvj18x_cs.c	2001/02/23 03:37:00	1.1.1.14.2.2
+++ drivers/net/pcmcia/fmvj18x_cs.c	2001/02/27 01:57:16
@@ -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;

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-27  0:14 [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx Arnaldo Carvalho de Melo
2001-02-27  0:41 ` [PATCH] tms380tr: update last_rx after netif_rx Arnaldo Carvalho de Melo
2001-02-27  1:57 ` [PATCH] fmvj18x_cs: don't reference skb after passing it to netif_rx Jeff Garzik
2001-02-27  0:25   ` 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).