Skip to content

Commit

Permalink
lockdep: Fix lockdep_no_validate against IRQ states
Browse files Browse the repository at this point in the history
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 <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-2dp5vmpsxeraqm42kgww6ge2@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jul 21, 2011
1 parent 4582c0a commit efbe2ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit efbe2ee

Please sign in to comment.