Commit 1fd69098 authored by Franck Bui-Huu's avatar Franck Bui-Huu Committed by Ralf Baechle

[MIPS] unwind_stack(): return ra if an exception occured at the first instruction

Signed-off-by: default avatarFranck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent f83b854a
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment