Received: with ECARTIS (v1.0.0; list netdev); Mon, 13 Sep 2004 12:40:23 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8DJeIpw002431 for ; Mon, 13 Sep 2004 12:40:19 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1C6wgH-0000AD-T4; Mon, 13 Sep 2004 20:40:06 +0100 Message-ID: <4145F789.7010502@pobox.com> Date: Mon, 13 Sep 2004 15:39:53 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andi Kleen CC: davem@redhat.com, netdev@oss.sgi.com, arjanv@redhat.com Subject: Re: [PATCH] Fix locking bug in lltx path References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 8733 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 1030 Lines: 38 Andi Kleen wrote: > 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; > + } please use the fancy new constants :) Jeff