On Mon, 2007-10-15 at 20:28 -0700, David Hubbard wrote:
Could you try if the below patch works for you?
--
Subject: lockdep: fix fault vs irq tracing
Ensure we fixup the IRQ state before we hit any locking code.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/mm/fault_32.c | 10 ++++++++++
arch/x86/mm/fault_64.c | 10 ++++++++++
2 files changed, 20 insertions(+)
Index: linux-2.6/arch/x86/mm/fault_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/fault_32.c
+++ linux-2.6/arch/x86/mm/fault_32.c
@@ -308,6 +308,16 @@ fastcall void __kprobes do_page_fault(st
int write, si_code;
int fault;
+#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
+ /*
+ * We can fault from pretty much anywhere, fix up the IRQ state.
+ */
+ if (raw_irqs_disabled())
+ trace_hardirqs_off();
+ else
+ trace_hardirqs_on();
+#endif
+
/* get the address */
address = read_cr2();
Index: linux-2.6/arch/x86/mm/fault_64.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/fault_64.c
+++ linux-2.6/arch/x86/mm/fault_64.c
@@ -311,6 +311,16 @@ asmlinkage void __kprobes do_page_fault(
unsigned long flags;
siginfo_t info;
+#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
+ /*
+ * We can fault from pretty much anywhere, fix up the IRQ state.
+ */
+ if (raw_irqs_disabled())
+ trace_hardirqs_off();
+ else
+ trace_hardirqs_on();
+#endif
+
tsk = current;
mm = tsk->mm;
prefetchw(&mm->mmap_sem);
-