]> err.no Git - linux-2.6/commitdiff
[PATCH] lockdep ifdef fix
authorJarek Poplawski <jarkao2@o2.pl>
Wed, 6 Sep 2006 07:03:39 +0000 (00:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 6 Sep 2006 18:00:01 +0000 (11:00 -0700)
With

CONFIG_SMP=y
CONFIG_PREEMPT=y
CONFIG_LOCKDEP=y
CONFIG_DEBUG_LOCK_ALLOC=y
# CONFIG_PROVE_LOCKING is not set

spin_unlock_irqrestore() goes through lockdep but spin_lock_irqsave() doesn't.
Apparently, bad things happen.

Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/spinlock.c

index bfd6ad9c0330b61b34d780392fdcf3e2a4c64386..fb524b009eefeca3ffd2a2a929421a7eeb997660 100644 (file)
@@ -72,7 +72,7 @@ EXPORT_SYMBOL(_write_trylock);
  * not re-enabled during lock-acquire (which the preempt-spin-ops do):
  */
 #if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \
-       defined(CONFIG_PROVE_LOCKING)
+       defined(CONFIG_DEBUG_LOCK_ALLOC)
 
 void __lockfunc _read_lock(rwlock_t *lock)
 {