Re: 2.6.17-rc5-mm1
From: Ingo Molnar
Date: Wed May 31 2006 - 10:10:51 EST
* Ingo Molnar <mingo@xxxxxxx> wrote:
> i think what happened is that the pagefault happened with irqs
> disabled, and the entry.S return-to-exception-site irq-flags tracing
> code mistakenly turned on the irq flag - causing the mismatch and
> lockdep's confusion.
here's the fix for the irqs-off iret irqflags-tracing problem. Does this
fix the bug(s) on your box?
Ingo
Index: linux/arch/i386/kernel/entry.S
===================================================================
--- linux.orig/arch/i386/kernel/entry.S
+++ linux/arch/i386/kernel/entry.S
@@ -364,6 +364,8 @@ restore_all:
CFI_REMEMBER_STATE
je ldt_ss # returning to user-space with LDT SS
restore_nocheck:
+ testl $IF_MASK,EFLAGS(%esp) # interrupts off (exception path) ?
+ jz restore_nocheck_notrace
TRACE_IRQS_ON
restore_nocheck_notrace:
RESTORE_REGS
@@ -404,7 +406,10 @@ ldt_ss:
* and a switch16 pointer on top of the current frame. */
call setup_x86_bogus_stack
CFI_ADJUST_CFA_OFFSET -8 # frame has moved
+ testl $IF_MASK,EFLAGS(%esp) # interrupts off (exception path) ?
+ jz restore_nocheck_notrace2
TRACE_IRQS_ON
+restore_nocheck_notrace2:
RESTORE_REGS
lss 20+4(%esp), %esp # switch to 16bit stack
1: iret
-
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/