Re: 2.6.9-rc1-mm5 bug in tcp_recvmsg?

From: David S. Miller
Date: Mon Sep 13 2004 - 19:01:02 EST


On Mon, 13 Sep 2004 16:54:27 -0700
Jesse Barnes <jbarnes@xxxxxxxxxxxx> wrote:

> tg3. I saw one trace that included do_poll (iirc) and another last week that
> had sys_select in it. I'll try to gather some more info.

What you're seeing might be due to the bug fixed by this patch:

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/13 12:58:04-07:00 ak@xxxxxx
# [NET]: Fix missing spin lock in lltx path.
#
# This fixes a silly missing spin lock in the relock path. For some
# reason it seems to still work when you don't have spinlock debugging
# enabled.
#
# Please apply.
#
# Thanks to Arjan's spinlock debug kernel for finding it.
#
# Signed-off-by: Andi Kleen <ak@xxxxxx>
# Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
#
# net/sched/sch_generic.c
# 2004/09/13 12:57:46-07:00 ak@xxxxxx +3 -1
# [NET]: Fix missing spin lock in lltx path.
#
# This fixes a silly missing spin lock in the relock path. For some
# reason it seems to still work when you don't have spinlock debugging
# enabled.
#
# Please apply.
#
# Thanks to Arjan's spinlock debug kernel for finding it.
#
# Signed-off-by: Andi Kleen <ak@xxxxxx>
# Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
#
diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c
--- a/net/sched/sch_generic.c 2004-09-13 16:38:39 -07:00
+++ b/net/sched/sch_generic.c 2004-09-13 16:38:39 -07:00
@@ -148,8 +148,10 @@
spin_lock(&dev->queue_lock);
return -1;
}
- if (ret == NETDEV_TX_LOCKED && nolock)
+ if (ret == NETDEV_TX_LOCKED && nolock) {
+ spin_lock(&dev->queue_lock);
goto collision;
+ }
}

/* NETDEV_TX_BUSY - we need to requeue */
-
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/