Skip to content

Commit

Permalink
Blackfin arch: handle case of d_path() returning error in decode_addr…
Browse files Browse the repository at this point in the history
…ess()

d_path() can return an error.  Most of its callers do something or other to
make up something sane in that case.  Do similar for blackfin's
decode_address() call to d_path().

Signed-off-by: Tim Pepper <lnxninja@linux.vnet.ibm.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Tim Pepper authored and Bryan Wu committed Oct 27, 2008
1 parent 4e14e83 commit 6a0bfff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/blackfin/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ static void decode_address(char *buf, unsigned long address)
char *name = p->comm;
struct file *file = vma->vm_file;

if (file)
name = d_path(&file->f_path, _tmpbuf,
if (file) {
char *d_name = d_path(&file->f_path, _tmpbuf,
sizeof(_tmpbuf));
if (!IS_ERR(d_name))
name = d_name;
}

/* FLAT does not have its text aligned to the start of
* the map while FDPIC ELF does ...
Expand Down

0 comments on commit 6a0bfff

Please sign in to comment.