Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11931
b: refs/heads/master
c: d362979
h: refs/heads/master
i:
  11929: 66d1180
  11927: d0b0bee
v: v3
  • Loading branch information
Russell King authored and Russell King committed Oct 30, 2005
1 parent aba1b5d commit c7e0186
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc07845d0ce20d771fb96b0a5db57ffec2a89d3e
refs/heads/master: d362979aa2b031b91ee12122e5c4cad89577d8d3
29 changes: 17 additions & 12 deletions trunk/arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,33 +198,38 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
barrier();
}

DEFINE_SPINLOCK(die_lock);

/*
* This function is protected against re-entrancy.
*/
NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs)
{
struct task_struct *tsk = current;
struct task_struct *tsk = thread->task;
static int die_counter;

console_verbose();
spin_lock_irq(&die_lock);
bust_spinlocks(1);

printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter);
print_modules();
__show_regs(regs);
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
tsk->comm, tsk->pid, tsk->thread_info + 1);
tsk->comm, tsk->pid, thread + 1);

if (!user_mode(regs) || in_interrupt()) {
dump_mem("Stack: ", regs->ARM_sp,
THREAD_SIZE + (unsigned long)tsk->thread_info);
dump_backtrace(regs, tsk);
dump_instr(regs);
}
}

DEFINE_SPINLOCK(die_lock);

/*
* This function is protected against re-entrancy.
*/
NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
{
struct thread_info *thread = current_thread_info();

console_verbose();
spin_lock_irq(&die_lock);
bust_spinlocks(1);
__die(str, err, thread, regs);
bust_spinlocks(0);
spin_unlock_irq(&die_lock);
do_exit(SIGSEGV);
Expand Down

0 comments on commit c7e0186

Please sign in to comment.