locking/lockdep: Fix hlock->pin_count reset on lock stack rebuilds
authorPeter Zijlstra <peterz@infradead.org>
Wed, 16 Sep 2015 14:10:40 +0000 (16:10 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 23 Sep 2015 07:48:53 +0000 (09:48 +0200)
commit21199f27b430576552b26210b3194a363d7f05cd
tree3fa021f09a7e2f777b18c35acc801222a466ae36
parentbcee19f424a0d8c26ecf2607b73c690802658b29
locking/lockdep: Fix hlock->pin_count reset on lock stack rebuilds

Various people reported hitting the "unpinning an unpinned lock"
warning. As it turns out there are 2 places where we take a lock out
of the middle of a stack, and in those cases it would fail to preserve
the pin_count when rebuilding the lock stack.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Reported-by: Tim Spriggs <tspriggs@apple.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davej@codemonkey.org.uk
Link: http://lkml.kernel.org/r/20150916141040.GA11639@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/locking/lockdep.c