diff options
author | Helge Deller <deller@gmx.de> | 2007-01-07 10:27:27 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@athena.road.mcmartin.ca> | 2007-02-17 01:04:13 -0500 |
commit | 0bbdac0897a48f415eb788bf3263c92bd5e97ffb (patch) | |
tree | 20692ef93d1a0995c3fe04e2d4536914a4a2c081 | |
parent | 6e16d9409e1f08594587855d2a280c391ba985ff (diff) |
[PARISC] detect recursive kernel crash earlier
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
-rw-r--r-- | arch/parisc/kernel/traps.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 7bf9e36f010d..1f62853e4c02 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -255,8 +255,16 @@ KERN_CRIT " || ||\n"); | |||
255 | printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n", | 255 | printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n", |
256 | current->comm, current->pid, str, err); | 256 | current->comm, current->pid, str, err); |
257 | 257 | ||
258 | dump_stack(); | 258 | /* Wot's wrong wif bein' racy? */ |
259 | if (current->thread.flags & PARISC_KERNEL_DEATH) { | ||
260 | printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__); | ||
261 | local_irq_enable(); | ||
262 | while (1); | ||
263 | } | ||
264 | current->thread.flags |= PARISC_KERNEL_DEATH; | ||
265 | |||
259 | show_regs(regs); | 266 | show_regs(regs); |
267 | dump_stack(); | ||
260 | 268 | ||
261 | if (in_interrupt()) | 269 | if (in_interrupt()) |
262 | panic("Fatal exception in interrupt"); | 270 | panic("Fatal exception in interrupt"); |
@@ -267,14 +275,6 @@ KERN_CRIT " || ||\n"); | |||
267 | panic("Fatal exception"); | 275 | panic("Fatal exception"); |
268 | } | 276 | } |
269 | 277 | ||
270 | /* Wot's wrong wif bein' racy? */ | ||
271 | if (current->thread.flags & PARISC_KERNEL_DEATH) { | ||
272 | printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__); | ||
273 | local_irq_enable(); | ||
274 | while (1); | ||
275 | } | ||
276 | |||
277 | current->thread.flags |= PARISC_KERNEL_DEATH; | ||
278 | do_exit(SIGSEGV); | 278 | do_exit(SIGSEGV); |
279 | } | 279 | } |
280 | 280 | ||