From: Tim Pepper Date: Mon, 27 Oct 2008 04:18:36 +0000 (+0800) Subject: Blackfin arch: handle case of d_path() returning error in decode_address() X-Git-Tag: upstream/snapshot3+hdmi~21470^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a0bfff44e4aa4ee1721b3daa004d2039576c70d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 1aa2c78..0003616 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) 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 ...