aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorFranck Bui-Huu <vagabon.xyz@gmail.com>2006-08-18 10:18:07 -0400
committerRalf Baechle <ralf@linux-mips.org>2006-09-27 08:37:58 -0400
commit1fd6909802b837ed5510603846c0ce5938d296a1 (patch)
tree5b9bb20189d38749b339990922a6059fb28ea3fd /arch/mips/kernel
parentf83b854a1d2d28bc1ed86fec8a80940b59f8d932 (diff)
[MIPS] unwind_stack(): return ra if an exception occured at the first instruction
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/process.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 951bf9ca3ce9..e7b0b385fb2b 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,
465 465
466 if (!kallsyms_lookup(pc, &size, &ofs, &modname, namebuf)) 466 if (!kallsyms_lookup(pc, &size, &ofs, &modname, namebuf))
467 return 0; 467 return 0;
468 if (ofs == 0) 468 /*
469 return 0; 469 * Return ra if an exception occured at the first instruction
470 */
471 if (unlikely(ofs == 0))
472 return ra;
470 473
471 info.func = (void *)(pc - ofs); 474 info.func = (void *)(pc - ofs);
472 info.func_size = ofs; /* analyze from start to ofs */ 475 info.func_size = ofs; /* analyze from start to ofs */