Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148568
b: refs/heads/master
c: a0cab65
h: refs/heads/master
v: v3
  • Loading branch information
Robin Getz authored and Mike Frysinger committed Jun 12, 2009
1 parent 77051d3 commit ec2ef8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9a3899d59c3f0fc074573f0eba2419b1e4c0bca
refs/heads/master: a0cab65642813b7990e1b4b2ab6ad92e171571f4
11 changes: 11 additions & 0 deletions trunk/arch/blackfin/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ static void decode_address(char *buf, unsigned long address)

asmlinkage void double_fault_c(struct pt_regs *fp)
{
#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
int j;
trace_buffer_save(j);
#endif

console_verbose();
oops_in_progress = 1;
#ifdef CONFIG_DEBUG_VERBOSE
Expand All @@ -220,6 +225,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp)
dump_bfin_process(fp);
dump_bfin_mem(fp);
show_regs(fp);
dump_bfin_trace_buffer();
}
#endif
panic("Double Fault - unrecoverable event");
Expand Down Expand Up @@ -832,6 +838,11 @@ void show_stack(struct task_struct *task, unsigned long *stack)
decode_address(buf, (unsigned int)stack);
printk(KERN_NOTICE " SP: [0x%p] %s\n", stack, buf);

if (!access_ok(VERIFY_READ, stack, (unsigned int)endstack - (unsigned int)stack)) {
printk(KERN_NOTICE "Invalid stack pointer\n");
return;
}

/* First thing is to look for a frame pointer */
for (addr = (unsigned int *)((unsigned int)stack & ~0xF); addr < endstack; addr++) {
if (*addr & 0x1)
Expand Down

0 comments on commit ec2ef8d

Please sign in to comment.