lkml.org 
[lkml]   [2006]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-19 09:45    [W:0.049 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site