[MIPS] unwind_stack(): return ra if an exception occured at the first instruction
authorFranck Bui-Huu <vagabon.xyz@gmail.com>
Fri, 18 Aug 2006 14:18:07 +0000 (16:18 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 27 Sep 2006 12:37:58 +0000 (13:37 +0100)
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/process.c

index 951bf9ca3ce955f02018bf4bfb46cad7aec52c35..e7b0b385fb2b6dd12b0687fef1bb45d48f206f3f 100644 (file)
@@ -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 */