Re: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked()

From: Peter Zijlstra
Date: Tue Apr 03 2018 - 10:43:21 EST


On Tue, Apr 03, 2018 at 07:17:18AM -0700, Paul E. McKenney wrote:
> Suggestions for a fix? Clearly great care is required when using it
> in things like WARN_ON()...

Yeah, don't use it there, use lockdep_assert_held().

As I stated before in this thread, ideally we'd make *_is_locked() go
away entirely.