[PATCH] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent
authorIngo Molnar <mingo@elte.hu>
Fri, 22 Dec 2006 09:08:52 +0000 (01:08 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 22 Dec 2006 16:55:48 +0000 (08:55 -0800)
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 <matthew@wil.cx>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/debug_locks.h

index a1c10b0..1678a5d 100644 (file)
@@ -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;                                              \
        }                                                               \