aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/lockdep/preload.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-09locking/lockdep: Eliminate lockdep_init()Andrey Ryabinin1-2/+0
Lockdep is initialized at compile time now. Get rid of lockdep_init(). Signed-off-by: Andrey Ryabinin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Krinkin <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
2015-08-25tools/liblockdep: Use the rbtree header provided by common tools headersSasha Levin1-1/+1
Recent changes to rbtree.h may break compilation. There is no reason to use a liblockdep specific header to begin with, so we'll use the one shared with all other tools/. Signed-off-by: Sasha Levin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2014-12-19tools/liblockdep: Fix debug_check thinko in mutex destroyKirill Smelkov1-2/+2
In mutex destroy code currently we pass to debug_check_no_locks_freed() [mem_from, mem_end) address region. But debug_check_no_locks_freed() accepts mem_from, mem_*len* i.e. second parameter is region length, not end address. And it was always so, starting from 2006 (fbb9ce95 "lockdep: core"). Fix it, or else on a mutex destroy we wrongly check much-wider-than-mutex region and can find not-yet-released other locks there and wrongly report BUGs on them. Signed-off-by: Kirill Smelkov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-07-07tools/liblockdep: Account for bitfield changes in lockdeps lock_acquireS. Lockwood-Childs1-8/+8
Commit fb9edbe984 shortened held_lock->check from a 2-bit field to a 1-bit field. Make liblockdep compatible with the new definition by passing check=1 to lock_acquire() calls, rather than the old value check=2 (which inadvertently disabled checks by overflowing to 0). Without this fix, several of the test cases in liblockdep run_tests.sh were failing. Signed-off-by: S. Lockwood-Childs <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-07-07tools/liblockdep: Remove debug print left over from developmentSasha Levin1-2/+0
Remove a debug print in init_preload() which was left over from development and isn't usefull at all currently. It was also causing false positive test results. Reported-by: S. Lockwood-Childs <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-07-07tools/liblockdep: Fix comparison of a boolean value with a value of 2zhangdianfang1-1/+1
Comparison of a boolean value (!__init_state) with a value of 2 (done) as currently happens in the code is unlikely to succeed and causes repeated initialization of the pthread function pointers. Instead, remove boolean comparison so that we would initialize said function pointers only once. Ref: https://bugzilla.kernel.org/show_bug.cgi?id=76741 Cc: Jean Delvare <[email protected]> Reported-by: David Binderman <[email protected]> Signed-off-by: Dianfang Zhang <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-02-26tools/liblockdep: Fix initialization code pathIra W. Snyder1-1/+1
This makes initialization actually happen. Without it, initialization is always skipped due to an incorrect conditional statement. Signed-off-by: Ira W. Snyder <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2013-11-27liblockdep: Support using LD_PRELOADSasha Levin1-0/+447
This allows lockdep to be used without being compiled in the original program. Usage is quite simple: LD_PRELOAD=/path/to/liblockdep.so /path/to/my/program And magically, you'll have lockdep checking in your program! Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>