From: Franck Bui-Huu Date: Fri, 18 Aug 2006 14:18:07 +0000 (+0200) Subject: [MIPS] unwind_stack(): return ra if an exception occured at the first instruction X-Git-Tag: v2.6.19-rc1~1013 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fd6909802b837ed5510603846c0ce5938d296a1;p=linux-2.6 [MIPS] unwind_stack(): return ra if an exception occured at the first instruction Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 951bf9ca3c..e7b0b385fb 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -465,8 +465,11 @@ unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, if (!kallsyms_lookup(pc, &size, &ofs, &modname, namebuf)) return 0; - if (ofs == 0) - return 0; + /* + * Return ra if an exception occured at the first instruction + */ + if (unlikely(ofs == 0)) + return ra; info.func = (void *)(pc - ofs); info.func_size = ofs; /* analyze from start to ofs */