Re: 2.6.9-rc1-mm5 bug in tcp_recvmsg?

David S. Miller
2004-09-13T23:58:01Z

On Mon, 13 Sep 2004 16:54:27 -0700
Jesse Barnes <jbarnes@engr.sgi.com> 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@muc.de
# [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@muc.de>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
# net/sched/sch_generic.c
# 2004/09/13 12:57:46-07:00 ak@muc.de +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@muc.de>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
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 */