From: Ingo Molnar <mingo@elte.hu>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: [patch] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent
Date: Sat, 16 Dec 2006 09:04:58 +0100 [thread overview]
Message-ID: <20061216080458.GC16116@elte.hu> (raw)
In-Reply-To: <20061216062633.GY21070@parisc-linux.org>
* Matthew Wilcox <matthew@wil.cx> wrote:
> Moreover, do we want to get stack dumps while running the locking
> testsuite in the first place? From various comments, it looks like
> it's supposed to be turned off, but it looks like the sense of
> debug_locks_silent is inverted in the definition of
> DEBUG_LOCKS_WARN_ON:
>
> if (unlikely(c)) { \
> if (debug_locks_silent || debug_locks_off()) \
> WARN_ON(1); \
>
> Surely that should be:
>
> if (!debug_locks_silent && debug_locks_off())
> WARN_ON(1);
oops, indeed! Fix below.
Ingo
------------->
Subject: [patch] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent
From: Ingo Molnar <mingo@elte.hu>
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>
---
include/linux/debug_locks.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/include/linux/debug_locks.h
===================================================================
--- linux.orig/include/linux/debug_locks.h
+++ linux/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_silent && debug_locks_off()) \
WARN_ON(1); \
__ret = 1; \
} \
next prev parent reply other threads:[~2006-12-16 8:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-16 6:26 Doubled stack dumps during locking testsuite Matthew Wilcox
2006-12-16 8:04 ` Ingo Molnar [this message]
2006-12-19 8:43 ` [patch] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent Jarek Poplawski
2006-12-19 8:51 ` Matthew Wilcox
2006-12-19 9:05 ` Jarek Poplawski
2006-12-19 9:31 ` Ingo Molnar
2006-12-19 9:40 ` Matthew Wilcox
2006-12-19 9:44 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061216080458.GC16116@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox