[tip:core/locking] lockdep: Fix lockdep_no_validate against IRQ states

From: tip-bot for Peter Zijlstra
Date: Thu Jul 21 2011 - 15:33:02 EST


Commit-ID: efbe2eee6dc0f179be84292bf269528b3ec365e9
Gitweb: http://git.kernel.org/tip/efbe2eee6dc0f179be84292bf269528b3ec365e9
Author: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
AuthorDate: Thu, 7 Jul 2011 11:39:45 +0200
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Thu, 21 Jul 2011 20:43:16 +0200

lockdep: Fix lockdep_no_validate against IRQ states

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@xxxxxxxxxxxxx>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-2dp5vmpsxeraqm42kgww6ge2@xxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/lockdep.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/