public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>,
	Matthew Wilcox <matthew@wil.cx>
Subject: Re: [patch] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent
Date: Tue, 19 Dec 2006 09:43:59 +0100	[thread overview]
Message-ID: <20061219084359.GB1731@ff.dom.local> (raw)
In-Reply-To: <20061216080458.GC16116@elte.hu>

On 16-12-2006 09:04, Ingo Molnar wrote:
> * Matthew Wilcox <matthew@wil.cx> wrote:
...
> 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;						\
>  	}								\

I wonder why doing debug_locks_off depends here on
debug_lock_silent state which is only "esthetical"
flag. And debug_locks_off() takes into consideration
debug_lock_silent after all. So IMHO:

	if (unlikely(c)) {						\
		if (debug_locks_off())					\
			WARN_ON(1);					\
		__ret = 1;						\
	}								\

Jarek P.

  reply	other threads:[~2006-12-19  8:42 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 ` [patch] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent Ingo Molnar
2006-12-19  8:43   ` Jarek Poplawski [this message]
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=20061219084359.GB1731@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mingo@elte.hu \
    /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