]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
i386: Fix double fault handler
authorChuck Ebbert <cebbert@redhat.com>
Fri, 10 Aug 2007 20:31:11 +0000 (22:31 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 11 Aug 2007 22:58:14 +0000 (15:58 -0700)
commit3dab307e527f2a9bbb4f9d00240374bb93d1945f
tree3e9a83d6cc1cee1dcfedff700c0b4aeebaa2f8d5
parent5fe4486c79cdc8dbbb2a9c3f884a5ad0830a5a23
i386: Fix double fault handler

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.

AK: Also fix broken ptr_ok() and turn printks into KERN_EMERG
AK: And add a PANIC prefix to make clear the system will hang
AK: (e.g. x86-64 will recover)

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/doublefault.c