diff options
author | Michel Lespinasse <[email protected]> | 2013-07-08 14:23:51 -0700 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2013-07-12 13:51:19 +0200 |
commit | c4be9cb4f19cbd534a6c4c334cd48d8bb483e17a (patch) | |
tree | 936e4c08a620b1614394b4bdff72d2d3b524b43d /lib/memory-notifier-error-inject.c | |
parent | a51805efae5dda0da66f79268ffcf0715f9dbea4 (diff) |
lglock: Update lockdep annotations to report recursive local locks
Oleg Nesterov recently noticed that the lockdep annotations in lglock.c
are not sufficient to detect some obvious deadlocks, such as
lg_local_lock(LOCK) + lg_local_lock(LOCK) or spin_lock(X) +
lg_local_lock(Y) vs lg_local_lock(Y) + spin_lock(X).
Both issues are easily fixed by indicating to lockdep that lglock's local
locks are not recursive. We shouldn't use the rwlock acquire/release
functions here, as lglock doesn't share the same semantics. Instead we
can base our lockdep annotations on the lock_acquire_shared (for local
lglock) and lock_acquire_exclusive (for global lglock) helpers.
I am not proposing new lglock specific helpers as I don't see the point of
the existing second level of helpers :)
Noticed-by: Oleg Nesterov <[email protected]>
Signed-off-by: Michel Lespinasse <[email protected]>
Cc: Lai Jiangshan <[email protected]>
Cc: "Srivatsa S. Bhat" <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions