aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/traps.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-10-11 10:25:05 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-10-11 10:25:05 -0400
commit03a6e5bd5ba7d2a37b0bf4327b83d7c83311b0a1 (patch)
treee7deeed51dfe326859aa10af6a6983ccabddd76b /arch/arm/kernel/traps.c
parente40c2ec6761d11043ad9f6352679049dbee836eb (diff)
ARM: update die() output
Make die() better match x86: - add printing of the last accessed sysfs file - ensure console_verbose() is called under the lock - ensure we panic outside of oops_exit() Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r--arch/arm/kernel/traps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index b551b6504966..f838f36eb702 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -231,6 +231,7 @@ static void __die(const char *str, int err, struct thread_info *thread, struct p
231 231
232 printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", 232 printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n",
233 str, err, ++die_counter); 233 str, err, ++die_counter);
234 sysfs_printk_last_file();
234 print_modules(); 235 print_modules();
235 __show_regs(regs); 236 __show_regs(regs);
236 printk(KERN_EMERG "Process %.*s (pid: %d, stack limit = 0x%p)\n", 237 printk(KERN_EMERG "Process %.*s (pid: %d, stack limit = 0x%p)\n",
@@ -255,13 +256,14 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
255 256
256 oops_enter(); 257 oops_enter();
257 258
258 console_verbose();
259 spin_lock_irq(&die_lock); 259 spin_lock_irq(&die_lock);
260 console_verbose();
260 bust_spinlocks(1); 261 bust_spinlocks(1);
261 __die(str, err, thread, regs); 262 __die(str, err, thread, regs);
262 bust_spinlocks(0); 263 bust_spinlocks(0);
263 add_taint(TAINT_DIE); 264 add_taint(TAINT_DIE);
264 spin_unlock_irq(&die_lock); 265 spin_unlock_irq(&die_lock);
266 oops_exit();
265 267
266 if (in_interrupt()) 268 if (in_interrupt())
267 panic("Fatal exception in interrupt"); 269 panic("Fatal exception in interrupt");
@@ -269,7 +271,6 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
269 if (panic_on_oops) 271 if (panic_on_oops)
270 panic("Fatal exception"); 272 panic("Fatal exception");
271 273
272 oops_exit();
273 do_exit(SIGSEGV); 274 do_exit(SIGSEGV);
274} 275}
275 276