Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92330
b: refs/heads/master
c: 7f1c906
h: refs/heads/master
v: v3
  • Loading branch information
Robin Getz authored and Bryan Wu committed Apr 24, 2008
1 parent d3c879f commit 701dd93
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 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: 4d555630704d3f6c0257dde3e622f9295f221c8b
refs/heads/master: 7f1c906808a36630990d83d872935c079b76595b
34 changes: 24 additions & 10 deletions trunk/arch/blackfin/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,30 @@ static void decode_address(char *buf, unsigned long address)
/* FLAT does not have its text aligned to the start of
* the map while FDPIC ELF does ...
*/
if (current->mm &&
(address > current->mm->start_code) &&
(address < current->mm->end_code))
offset = address - current->mm->start_code;
else
offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT);

sprintf(buf, "<0x%p> [ %s + 0x%lx ]",
(void *)address, name, offset);

/* before we can check flat/fdpic, we need to
* make sure current is valid
*/
if ((unsigned long)current >= FIXED_CODE_START &&
!((unsigned long)current & 0x3)) {
if (current->mm &&
(address > current->mm->start_code) &&
(address < current->mm->end_code))
offset = address - current->mm->start_code;
else
offset = (address - vma->vm_start) +
(vma->vm_pgoff << PAGE_SHIFT);

sprintf(buf, "<0x%p> [ %s + 0x%lx ]",
(void *)address, name, offset);
} else
sprintf(buf, "<0x%p> [ %s vma:0x%lx-0x%lx]",
(void *)address, name,
vma->vm_start, vma->vm_end);

if (!in_atomic)
mmput(mm);

goto done;
}

Expand Down Expand Up @@ -658,7 +671,8 @@ void dump_bfin_process(struct pt_regs *fp)
/* Because we are crashing, and pointers could be bad, we check things
* pretty closely before we use them
*/
if (!((unsigned long)current & 0x3) && current->pid) {
if ((unsigned long)current >= FIXED_CODE_START &&
!((unsigned long)current & 0x3) && current->pid) {
printk(KERN_NOTICE "CURRENT PROCESS:\n");
if (current->comm >= (char *)FIXED_CODE_START)
printk(KERN_NOTICE "COMM=%s PID=%d\n",
Expand Down

0 comments on commit 701dd93

Please sign in to comment.