Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] lockdep: show more details about self-test failures

Make the locking self-test failures (of 'FAILURE' type) easier to debug by
printing more information.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Ingo Molnar and committed by
Linus Torvalds
2ee91f19 50cc670a

+6 -1
+1 -1
include/linux/debug_locks.h
··· 24 24 int __ret = 0; \ 25 25 \ 26 26 if (unlikely(c)) { \ 27 - if (debug_locks_off()) \ 27 + if (debug_locks_silent || debug_locks_off()) \ 28 28 WARN_ON(1); \ 29 29 __ret = 1; \ 30 30 } \
+3
kernel/mutex-debug.c
··· 77 77 78 78 void debug_mutex_unlock(struct mutex *lock) 79 79 { 80 + if (unlikely(!debug_locks)) 81 + return; 82 + 80 83 DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info()); 81 84 DEBUG_LOCKS_WARN_ON(lock->magic != lock); 82 85 DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
+2
lib/locking-selftest.c
··· 963 963 printk("failed|"); 964 964 } else { 965 965 unexpected_testcase_failures++; 966 + 966 967 printk("FAILED|"); 968 + dump_stack(); 967 969 } 968 970 } else { 969 971 testcase_successes++;