diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2016-02-04 16:40:40 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-02-09 13:06:08 +0300 |
commit | 8a5fd56431fe1682e870bd6ab0c276e74befbeb9 (patch) | |
tree | bc2047bcdb5f7a29656deeaee113b8223b5246db /lib | |
parent | 765bdb406de4b6132e349c5d4e077866536a9cc0 (diff) | |
download | linux-8a5fd56431fe1682e870bd6ab0c276e74befbeb9.tar.xz |
locking/lockdep: Fix stack trace caching logic
check_prev_add() caches saved stack trace in static trace variable
to avoid duplicate save_trace() calls in dependencies involving trylocks.
But that caching logic contains a bug. We may not save trace on first
iteration due to early return from check_prev_add(). Then on the
second iteration when we actually need the trace we don't save it
because we think that we've already saved it.
Let check_prev_add() itself control when stack is saved.
There is another bug. Trace variable is protected by graph lock.
But we can temporary release graph lock during printing.
Fix this by invalidating cached stack trace when we release graph lock.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
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: glider@google.com
Cc: kcc@google.com
Cc: peter@hurleysoftware.com
Cc: sasha.levin@oracle.com
Link: http://lkml.kernel.org/r/1454593240-121647-1-git-send-email-dvyukov@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions