[patch, -rc5-mm1] lock validator, fix NULL type->name bug

Ingo Molnar
2006-05-30T11:11:18Z

Subject: lock validator, fix NULL type->name bug
From: Ingo Molnar <mingo@elte.hu>

this should fix the bug reported Mike Galbraith: pass in a non-NULL
mutex name string even if DEBUG_MUTEXES is turned off.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/mutex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/include/linux/mutex.h
===================================================================
--- linux.orig/include/linux/mutex.h
+++ linux/include/linux/mutex.h
@@ -80,7 +80,7 @@ struct mutex_waiter {
do { \
static struct lockdep_type_key __key; \
\
- __mutex_init((mutex), NULL, &__key); \
+ __mutex_init((mutex), #mutex, &__key); \
} while (0)
# define mutex_destroy(mutex) do { } while (0)
#endif