From: Ingo Molnar Date: Fri, 22 Dec 2006 09:08:52 +0000 (-0800) Subject: [PATCH] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9127d4b1d9b2e8fba8e7fbc7f88ea93e5eb01396;p=linux-beck.git [PATCH] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent Matthew Wilcox noticed that the debug_locks_silent use should be inverted in DEBUG_LOCKS_WARN_ON(). This bug was causing spurious stacktraces and incorrect failures in the locking self-test on the parisc kernel. Bug-found-by: Matthew Wilcox Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index a1c10b0c4cf0..1678a5de7013 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h @@ -24,7 +24,7 @@ extern int debug_locks_off(void); int __ret = 0; \ \ if (unlikely(c)) { \ - if (debug_locks_silent || debug_locks_off()) \ + if (debug_locks_off() && !debug_locks_silent) \ WARN_ON(1); \ __ret = 1; \ } \