From: Ryan Mallon <rmallon@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
milosz@adfin.com,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Is spin_is_locked() safe to use with BUG_ON()/WARN_ON()?
Date: Fri, 24 May 2013 11:29:38 +1000 [thread overview]
Message-ID: <519EC282.1010800@gmail.com> (raw)
In-Reply-To: <6788.1369321955@warthog.procyon.org.uk>
On 24/05/13 01:12, David Howells wrote:
> Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>> We do *not* want to add some crazy "spin_is_nt_locked". We just want
>> to get rid of these idiotic debug tests.
>
> Generally, I think you are right, though there are also some checks in
> deallocation routines that check that a spinlock is not currently held before
> releasing the memory holding it - should those be allowed to stay? I'd be
> tempted to wrap the whole check in something, perhaps an "spin_lock_uninit()"
> and move the check to a header file. Would this be useful for lockdep or
> anything like that?
lockdep has lockdep_assert_held(), which might be what you want. Though
it looks like it possibly also has the false positive issues on SMP?
~Ryan
next prev parent reply other threads:[~2013-05-24 1:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 14:50 Is spin_is_locked() safe to use with BUG_ON()/WARN_ON()? David Howells
2013-05-23 14:59 ` Linus Torvalds
2013-05-23 15:12 ` David Howells
2013-05-24 1:29 ` Ryan Mallon [this message]
2013-05-24 1:29 ` Ryan Mallon
2013-05-28 8:07 ` Ingo Molnar
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=519EC282.1010800@gmail.com \
--to=rmallon@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=milosz@adfin.com \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).