[PARISC] detect recursive kernel crash earlier
Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
This commit is contained in:
committed by
Kyle McMartin
parent
6e16d9409e
commit
0bbdac0897
@@ -255,8 +255,16 @@ KERN_CRIT " || ||\n");
|
|||||||
printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n",
|
printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n",
|
||||||
current->comm, current->pid, str, err);
|
current->comm, current->pid, str, err);
|
||||||
|
|
||||||
dump_stack();
|
/* Wot's wrong wif bein' racy? */
|
||||||
|
if (current->thread.flags & PARISC_KERNEL_DEATH) {
|
||||||
|
printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);
|
||||||
|
local_irq_enable();
|
||||||
|
while (1);
|
||||||
|
}
|
||||||
|
current->thread.flags |= PARISC_KERNEL_DEATH;
|
||||||
|
|
||||||
show_regs(regs);
|
show_regs(regs);
|
||||||
|
dump_stack();
|
||||||
|
|
||||||
if (in_interrupt())
|
if (in_interrupt())
|
||||||
panic("Fatal exception in interrupt");
|
panic("Fatal exception in interrupt");
|
||||||
@@ -267,14 +275,6 @@ KERN_CRIT " || ||\n");
|
|||||||
panic("Fatal exception");
|
panic("Fatal exception");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wot's wrong wif bein' racy? */
|
|
||||||
if (current->thread.flags & PARISC_KERNEL_DEATH) {
|
|
||||||
printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);
|
|
||||||
local_irq_enable();
|
|
||||||
while (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
current->thread.flags |= PARISC_KERNEL_DEATH;
|
|
||||||
do_exit(SIGSEGV);
|
do_exit(SIGSEGV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user