Re: 2.6.9 RCU breakage in dev_queue_xmit

From: Herbert Xu
Date: Tue Nov 09 2004 - 20:55:07 EST


Jeff V. Merkey <jmerkey@xxxxxxxxx> wrote:
>
> Running dual gigabit interfaces at 196 MB/S (megabytes/second) on
> receive, 12 CLK interacket gap time, 1500 bytes payload
> at 65000 packets per second per gigabit interface, and retransmitting
> received packets at 130 MB/S out of a third gigabit interface
> with skb, RCU locks in dev_queue_xmit breaks and enters the following state:

This patch might help.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/11/01 17:41:19-08:00 mingo@xxxxxxx
# [NET]: Fix unbalanced local_bh_enable() in dev_queue_xmit()
#
# Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
# Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
#
# net/core/dev.c
# 2004/11/01 17:40:59-08:00 mingo@xxxxxxx +5 -6
# [NET]: Fix unbalanced local_bh_enable() in dev_queue_xmit()
#
# Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
# Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
#
diff -Nru a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c 2004-11-10 12:45:48 +11:00
+++ b/net/core/dev.c 2004-11-10 12:45:48 +11:00
@@ -1261,6 +1261,11 @@
struct Qdisc *q;
int rc = -ENOMEM;

+ /* Disable soft irqs for various locks below. Also
+ * stops preemption for RCU.
+ */
+ local_bh_disable();
+
if (skb_shinfo(skb)->frag_list &&
!(dev->features & NETIF_F_FRAGLIST) &&
__skb_linearize(skb, GFP_ATOMIC))
@@ -1284,12 +1289,6 @@
skb->protocol != htons(ETH_P_IP))))
if (skb_checksum_help(skb, 0))
goto out_kfree_skb;
-
-
- /* Disable soft irqs for various locks below. Also
- * stops preemption for RCU.
- */
- local_bh_disable();

/* Updates of qdisc are serialized by queue_lock.
* The struct Qdisc which is pointed to by qdisc is now a
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/