lkml.org 
[lkml]   [2013]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Is spin_is_locked() safe to use with BUG_ON()/WARN_ON()?
Date
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?

David


\
 
 \ /
  Last update: 2013-05-23 18:41    [W:0.060 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site