Skip to content

Commit

Permalink
[PATCH] lockdep ifdef fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarek Poplawski authored and Linus Torvalds committed Sep 6, 2006
1 parent c336923 commit fc47e7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit fc47e7b

Please sign in to comment.