summaryrefslogtreecommitdiffstats
path: root/kernel/mutex.c
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2013-07-08 14:23:51 -0700
committerIngo Molnar <mingo@kernel.org>2013-07-12 13:51:19 +0200
commitc4be9cb4f19cbd534a6c4c334cd48d8bb483e17a (patch)
tree936e4c08a620b1614394b4bdff72d2d3b524b43d /kernel/mutex.c
parenta51805efae5dda0da66f79268ffcf0715f9dbea4 (diff)
downloadtalos-obmc-linux-c4be9cb4f19cbd534a6c4c334cd48d8bb483e17a.tar.gz
talos-obmc-linux-c4be9cb4f19cbd534a6c4c334cd48d8bb483e17a.zip
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 <oleg@redhat.com> Signed-off-by: Michel Lespinasse <walken@google.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andi Kleen <ak@linux.intel.com> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20130708212352.1769031C15E@corp2gmr1-1.hot.corp.google.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/mutex.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud