]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] panic_on_oops: remove ssleep()
authorHorms <horms@verge.net.au>
Sun, 30 Jul 2006 10:03:34 +0000 (03:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Jul 2006 20:28:39 +0000 (13:28 -0700)
This patch is part of an effort to unify the panic_on_oops behaviour across
all architectures that implement it.

It was pointed out to me by Andi Kleen that if an oops has occured in
interrupt context, then calling sleep() in the oops path will only cause a
panic, and that it would be really better for it not to be in the path at
all.

This patch removes the ssleep() call and reworks the console message
accordinly.  I have a slght concern that the resulting console message is
too long, feedback welcome.

For powerpc it also unifies the 32bit and 64bit behaviour.

Fror x86_64, this patch only updates the console message, as ssleep() is
already not present.

Signed-off-by: Horms <horms@verge.net.au>
Acked-by: Paul Mackerras <paulus@samba.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/arm/kernel/traps.c
arch/i386/kernel/traps.c
arch/ia64/kernel/traps.c
arch/powerpc/kernel/traps.c
arch/x86_64/kernel/traps.c
arch/xtensa/kernel/traps.c

index 35a052fc177aeaefbebd2ceb294805d472ac7d45..4e29dd03e58297725af0dd5203ac6c55d5317a14 100644 (file)
@@ -232,11 +232,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
        bust_spinlocks(0);
        spin_unlock_irq(&die_lock);
 
-       if (panic_on_oops) {
-               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
-               ssleep(5);
-               panic("Fatal exception");
-       }
+       if (panic_on_oops)
+               panic("Fatal exception: panic_on_oops");
 
        do_exit(SIGSEGV);
 }
index 021f8fdc7512a296cf9aa00a6c2d3fb15bd9cac3..0d4005dc06c545b2c488e01ea523a1c80a2892bb 100644 (file)
@@ -453,11 +453,9 @@ void die(const char * str, struct pt_regs * regs, long err)
        if (in_interrupt())
                panic("Fatal exception in interrupt");
 
-       if (panic_on_oops) {
-               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
-               ssleep(5);
-               panic("Fatal exception");
-       }
+       if (panic_on_oops)
+               panic("Fatal exception: panic_on_oops");
+
        oops_exit();
        do_exit(SIGSEGV);
 }
index e7bbb0f40aa20eacb9b07431f360fbd456cc91e1..5a0420464c6ca747bcf8243646541b33e3b9a2b8 100644 (file)
@@ -117,11 +117,8 @@ die (const char *str, struct pt_regs *regs, long err)
        die.lock_owner = -1;
        spin_unlock_irq(&die.lock);
 
-       if (panic_on_oops) {
-               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
-               ssleep(5);
-               panic("Fatal exception");
-       }
+       if (panic_on_oops)
+               panic("Fatal exception: panic_on_oops");
 
        do_exit(SIGSEGV);
 }
index 3c668078e524fefb03c628dd1fd986d8745f092d..2105767fcc57dff8b22c699aa2bdf0fbb63581cf 100644 (file)
@@ -150,13 +150,9 @@ int die(const char *str, struct pt_regs *regs, long err)
        if (in_interrupt())
                panic("Fatal exception in interrupt");
 
-       if (panic_on_oops) {
-#ifdef CONFIG_PPC64
-               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
-               ssleep(5);
-#endif
-               panic("Fatal exception");
-       }
+       if (panic_on_oops)
+               panic("Fatal exception: panic_on_oops");
+
        do_exit(err);
 
        return 0;
index f7a9d1421078648304f243347bc3f6238428488b..4e9938dee0609489cfd0db60fbb6134e12617dcf 100644 (file)
@@ -529,7 +529,7 @@ void __kprobes oops_end(unsigned long flags)
                /* Nest count reaches zero, release the lock. */
                spin_unlock_irqrestore(&die_lock, flags);
        if (panic_on_oops)
-               panic("Oops");
+               panic("Fatal exception: panic_on_oops");
 }
 
 void __kprobes __die(const char * str, struct pt_regs * regs, long err)
index 27e409089a7b9837ce33927236f21ea89323fdf1..9734960a24519a625ad5e712ada896f3cd7e0f28 100644 (file)
@@ -487,11 +487,9 @@ void die(const char * str, struct pt_regs * regs, long err)
        if (in_interrupt())
                panic("Fatal exception in interrupt");
 
-       if (panic_on_oops) {
-               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
-               ssleep(5);
-               panic("Fatal exception");
-       }
+       if (panic_on_oops)
+               panic("Fatal exception: panic_on_oops");
+
        do_exit(err);
 }