aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTim Pepper <lnxninja@linux.vnet.ibm.com>2008-10-27 00:18:36 -0400
committerBryan Wu <cooloney@kernel.org>2008-10-27 00:18:36 -0400
commit6a0bfff44e4aa4ee1721b3daa004d2039576c70d (patch)
tree65de8b224933c7ac731457fd98f889c5cb92e843 /arch
parent4e14e833ac3b97a4aa8803eea49f899adc5bb5f4 (diff)
Blackfin arch: handle case of d_path() returning error in decode_address()
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/traps.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 1aa2c788e228..0003616d02a2 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -147,9 +147,12 @@ static void decode_address(char *buf, unsigned long address)
147 char *name = p->comm; 147 char *name = p->comm;
148 struct file *file = vma->vm_file; 148 struct file *file = vma->vm_file;
149 149
150 if (file) 150 if (file) {
151 name = d_path(&file->f_path, _tmpbuf, 151 char *d_name = d_path(&file->f_path, _tmpbuf,
152 sizeof(_tmpbuf)); 152 sizeof(_tmpbuf));
153 if (!IS_ERR(d_name))
154 name = d_name;
155 }
153 156
154 /* FLAT does not have its text aligned to the start of 157 /* FLAT does not have its text aligned to the start of
155 * the map while FDPIC ELF does ... 158 * the map while FDPIC ELF does ...