提交 def32fad 编写于 作者: V Vineet Gupta

ARC: stack unwinder to bail if PC is not kernel mode

Currently, it doesn't invoke the callback but continues to unwind

Also while at it - simplify the code a bit
Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
上级 082ae1e1
......@@ -122,19 +122,17 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
while (1) {
address = UNW_PC(&frame_info);
if (address && __kernel_text_address(address)) {
if (consumer_fn(address, arg) == -1)
break;
}
if (!address || !__kernel_text_address(address))
break;
ret = arc_unwind(&frame_info);
if (consumer_fn(address, arg) == -1)
break;
if (ret == 0) {
frame_info.regs.r63 = frame_info.regs.r31;
continue;
} else {
ret = arc_unwind(&frame_info);
if (ret)
break;
}
frame_info.regs.r63 = frame_info.regs.r31;
}
return address; /* return the last address it saw */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册