Received: with ECARTIS (v1.0.0; list netdev); Mon, 13 Sep 2004 11:11:22 -0700 (PDT) Received: from zero.aec.at (Jonathan_Fomry@zero.aec.at [193.170.194.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8DIBEQd028877 for ; Mon, 13 Sep 2004 11:11:15 -0700 Received: from averell.firstfloor.org.muc.de (Martha_Braymance@localhost.localdomain [127.0.0.1]) by zero.aec.at (8.11.6/8.11.2) with ESMTP id i8DIB0g31769; Mon, 13 Sep 2004 20:11:01 +0200 To: davem@redhat.com cc: netdev@oss.sgi.com, arjanv@redhat.com Subject: [PATCH] Fix locking bug in lltx path From: Andi Kleen Date: Mon, 13 Sep 2004 20:11:00 +0200 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 8728 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ak@muc.de Precedence: bulk X-list: netdev Content-Length: 942 Lines: 35 Thanks to Arjan's spinlock debug kernel for finding it. 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. -Andi -------------------------------------------------------------------- Fix missing spin lock in lltx path. Thanks to Arjan's spinlock debug kernel for finding it. Signed-off-by: Andi Kleen diff -u linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X linux-2.6.9rc1-bk19/net/sched/sch_generic.c --- linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X 2004-09-13 08:51:46.000000000 +0200 +++ linux-2.6.9rc1-bk19/net/sched/sch_generic.c 2004-09-13 19:22:50.000000000 +0200 @@ -153,8 +153,10 @@ spin_lock(&dev->queue_lock); return -1; } - if (ret == -1 && nolock) + if (ret == -1 && nolock) { + spin_lock(&dev->queue_lock); goto collision; + } } /* Release the driver */