Skip to content

Commit

Permalink
ARM: update die() output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Oct 11, 2009
1 parent e40c2ec commit 03a6e5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ static void __die(const char *str, int err, struct thread_info *thread, struct p

printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n",
str, err, ++die_counter);
sysfs_printk_last_file();
print_modules();
__show_regs(regs);
printk(KERN_EMERG "Process %.*s (pid: %d, stack limit = 0x%p)\n",
Expand All @@ -255,21 +256,21 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)

oops_enter();

console_verbose();
spin_lock_irq(&die_lock);
console_verbose();
bust_spinlocks(1);
__die(str, err, thread, regs);
bust_spinlocks(0);
add_taint(TAINT_DIE);
spin_unlock_irq(&die_lock);
oops_exit();

if (in_interrupt())
panic("Fatal exception in interrupt");

if (panic_on_oops)
panic("Fatal exception");

oops_exit();
do_exit(SIGSEGV);
}

Expand Down

0 comments on commit 03a6e5b

Please sign in to comment.