Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 7 Aug 2002 16:59:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 7 Aug 2002 16:59:09 -0400 Received: from garrincha.netbank.com.br ([200.203.199.88]:56075 "HELO garrincha.netbank.com.br") by vger.kernel.org with SMTP id ; Wed, 7 Aug 2002 16:59:06 -0400 Date: Wed, 7 Aug 2002 18:02:19 -0300 (BRT) From: Rik van Riel X-X-Sender: riel@imladris.surriel.com To: Jesse Barnes cc: linux-kernel@vger.kernel.org, , , Subject: Re: [PATCH] lock assertion macros for 2.5.30 In-Reply-To: <20020807205134.GA27013@sgi.com> Message-ID: X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 34 On Wed, 7 Aug 2002, Jesse Barnes wrote: > +++ linux-2.5.30-lockassert/drivers/scsi/scsi.c Wed Aug 7 11:35:32 2002 > @@ -262,7 +262,7 @@ > + MUST_NOT_HOLD(q->queue_lock); ... > +#if defined(CONFIG_DEBUG_SPINLOCK) && defined(CONFIG_SMP) > +#define MUST_HOLD(lock) BUG_ON(!spin_is_locked(lock)) > +#define MUST_NOT_HOLD(lock) BUG_ON(spin_is_locked(lock)) Please tell me the MUST_NOT_HOLD thing is a joke. What is to prevent another CPU in another code path from holding this spinlock when the code you've inserted the MUST_NOT_HOLD in is on its merry way not holding the lock ? regards, Rik -- Bravely reimplemented by the knights who say "NIH". http://www.surriel.com/ http://distro.conectiva.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/