Skip to content

Commit

Permalink
[MIPS] unwind_stack(): return ra if an exception occured at the first…
Browse files Browse the repository at this point in the history
… instruction

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Franck Bui-Huu authored and Ralf Baechle committed Sep 27, 2006
1 parent f83b854 commit 1fd6909
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/mips/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1fd6909

Please sign in to comment.