projects/linux·commit efbe2eee

lockdep: Fix lockdep_no_validate against IRQ states

efbe2eee · Peter Zijlstra <[email protected]> · 2011-07-07 11:39:45 +02:00

Thomas noticed that a lock marked with lockdep_set_novalidate_class()
will still trigger warnings for IRQ inversions. Cure this by skipping
those when marking irq state.

Reported-and-tested-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Commit
efbe2eee6dc0f179be84292bf269528b3ec365e9
Parents
4582c0a4

Changes

1 files changed · +3 −0

FileStatusAddDelContent
kernel/lockdep.cmodified+3−0View file

kernel/lockdep.c

View file
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 298c927..628276d 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2468,6 +2468,9 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark)
BUG_ON(usage_bit >= LOCK_USAGE_STATES);
+ if (hlock_class(hlock)->key == &__lockdep_no_validate__)
+ continue;
+
if (!mark_lock(curr, hlock, usage_bit))
return 0;
}