]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
i386: Fix double fault handler
authorChuck Ebbert <cebbert@redhat.com>
Wed, 15 Aug 2007 10:38:57 +0000 (12:38 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Aug 2007 23:23:27 +0000 (16:23 -0700)
commitdad2f19424a2f4d30009e5aa51aca05a0bba7020
treefd48b707b4e6c067f15f8c60b91b8b4968906364
parentc2c1d493fa0ee16491bffd6682cf4f479b8792c2
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/i386/kernel/doublefault.c