* [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
* [PATCH] defxx.c: don't reference skb after passing it to netif_rx
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 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-02-26 23:39 UTC (permalink / raw)
To: Alan Cox, stefani, linux-kernel
one more.
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/defxx.c Tue Feb 13 19:15:05 2001
+++ linux-2.4.2.acme/drivers/net/defxx.c Mon Feb 26 22:09:29 2001
@@ -2858,6 +2858,7 @@
skb->dev = bp->dev; /* pass up device pointer */
skb->protocol = fddi_type_trans(skb, bp->dev);
+ bp->rcv_total_bytes += skb->len;
netif_rx(skb);
/* Update the rcv counters */
@@ -2865,8 +2866,6 @@
bp->rcv_total_frames++;
if (*(p_buff + RCV_BUFF_K_DA) & 0x01)
bp->rcv_multicast_frames++;
-
- bp->rcv_total_bytes += skb->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).