public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@sgi.com>
To: pmenage@ensim.com
Cc: Daniel Phillips <phillips@arcor.de>, linux-kernel@vger.kernel.org
Subject: Re: spinlock assertion macros
Date: Thu, 11 Jul 2002 21:38:34 -0700	[thread overview]
Message-ID: <20020712043834.GA710558@sgi.com> (raw)
In-Reply-To: <E17SpMA-0008OG-00@pmenage-dt.ensim.com>

On Thu, Jul 11, 2002 at 06:36:26PM -0700, pmenage@ensim.com wrote:
> The spin_assert_unlocked() macro in Jesse's patch doesn't cope with
> the fact that someone else might quite legitimately have the spinlock
> locked. You'd need debugging spinlocks that track the owner of the
> spinlock, and then check in MUST_NOT_HOLD() you'd check that
> lock->owner != current. You'd also have to have some special
> non-checking lock/unlock macros to handle situations where locks are
> taken in non-process context or released by someone other than the
> original locker (does the migration code still do that?).

You're right about that, it would be much more useful to add a
spin_assert_unlocked_all() or MUST_NOT_HOLD_ANY() macro, as Arnd
suggested.  I'll take the suggestions I've received and try to put
together a more complete patch early next week.  It'll include lock
checks for rwlocks, semaphores, and rwsems as well as the global
no-locks-held macro.  And as an added bonus, I'll even try to test it
:).

Thanks,
Jesse

  reply	other threads:[~2002-07-12  4:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0C01A29FBAE24448A792F5C68F5EA47D2B0FDD@nasdaq.ms.ensim.com>
2002-07-12  1:36 ` spinlock assertion macros pmenage
2002-07-12  4:38   ` Jesse Barnes [this message]
2002-07-10 21:28 BKL removal Rick Lindsley
2002-07-10 22:24 ` Daniel Phillips
2002-07-10 23:36   ` spinlock assertion macros Jesse Barnes
2002-07-11  0:54     ` Andreas Dilger
2002-07-11  1:10       ` Jesse Barnes
2002-07-11  5:31     ` Daniel Phillips
2002-07-11  7:19       ` george anzinger
2002-07-11 16:35       ` Oliver Xymoron
2002-07-11 23:52         ` Sandy Harris
2002-07-12  0:56           ` Daniel Phillips
2002-07-12  3:22           ` Oliver Xymoron
2002-07-11 18:03       ` Jesse Barnes
2002-07-11 19:17         ` Daniel Phillips
2002-07-12 12:07           ` Dave Jones
2002-07-12 12:55             ` Daniel Phillips
2002-07-12 19:24               ` Arnd Bergmann
2002-07-12 17:42                 ` Daniel Phillips
2002-07-17  2:22                   ` Jesse Barnes
2002-07-17  6:34                     ` Daniel Phillips
2002-07-17 11:09                     ` Arnd Bergmann
2002-07-12 20:41               ` Oliver Xymoron
2002-07-13  3:21                 ` Daniel Phillips
2002-07-12 17:49             ` Robert Love
2002-07-12 17:58               ` Dave Jones
2002-07-11 10:51     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020712043834.GA710558@sgi.com \
    --to=jbarnes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@arcor.de \
    --cc=pmenage@ensim.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox