lkml.org 
[lkml]   [2006]   [May]   [31]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
 
Messages in this thread
Patch in this message
/
DateWed, 31 May 2006 16:12:08 +0200
FromIngo Molnar <>
SubjectRe: 2.6.17-rc5-mm1
* 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-05-31 16:14    [from the cache]
©2003-2008