public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* i386 doublefault handler is broken with CONFIG_DEBUG_SPINLOCK
@ 2007-08-09 16:49 Chuck Ebbert
  2007-08-09 17:49 ` Andi Kleen
  0 siblings, 1 reply; 8+ messages in thread
From: Chuck Ebbert @ 2007-08-09 16:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jeremy Fitzhardinge, Andi Kleen

The new percpu code has apparently broken the doublefault handler
when CONFIG_DEBUG_SPINLOCK is set. Doublefault is handled by
a hardware task, making the check

        SPIN_BUG_ON(lock->owner == current, lock, "recursion");

fault because it uses the FS register to access the percpu data
for current, and that register is zero in the new TSS. (The trace
I saw was on 2.6.20 where it was GS, but it looks like this will
still happen with FS on 2.6.22.)

Initializing FS in the doublefault_tss should fix it.

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>

---

 NOTE: not even compile tested.

 arch/i386/kernel/doublefault.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-2.6.22.noarch.orig/arch/i386/kernel/doublefault.c
+++ linux-2.6.22.noarch/arch/i386/kernel/doublefault.c
@@ -63,6 +63,7 @@ struct tss_struct doublefault_tss __cach
 		.cs		= __KERNEL_CS,
 		.ss		= __KERNEL_DS,
 		.ds		= __USER_DS,
+		.fs		= __KERNEL_PERCPU,
 
 		.__cr3		= __pa(swapper_pg_dir)
 	}

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-08-10 19:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 16:49 i386 doublefault handler is broken with CONFIG_DEBUG_SPINLOCK Chuck Ebbert
2007-08-09 17:49 ` Andi Kleen
2007-08-09 18:40   ` Chuck Ebbert
2007-08-09 19:00     ` Jeremy Fitzhardinge
2007-08-09 23:16     ` Andi Kleen
2007-08-09 23:35       ` Chuck Ebbert
2007-08-10  8:23         ` Andi Kleen
2007-08-10 19:11           ` Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox