Re: 2.6.17-rc5-mm1

Ingo Molnar
2006-05-31T14:11:49Z

* Ingo Molnar <mingo@elte.hu> 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