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: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
parent
082ae1e157
commit
def32fad84
|
@ -122,19 +122,17 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
|
||||||
while (1) {
|
while (1) {
|
||||||
address = UNW_PC(&frame_info);
|
address = UNW_PC(&frame_info);
|
||||||
|
|
||||||
if (address && __kernel_text_address(address)) {
|
if (!address || !__kernel_text_address(address))
|
||||||
if (consumer_fn(address, arg) == -1)
|
break;
|
||||||
break;
|
|
||||||
}
|
if (consumer_fn(address, arg) == -1)
|
||||||
|
break;
|
||||||
|
|
||||||
ret = arc_unwind(&frame_info);
|
ret = arc_unwind(&frame_info);
|
||||||
|
if (ret)
|
||||||
if (ret == 0) {
|
|
||||||
frame_info.regs.r63 = frame_info.regs.r31;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
frame_info.regs.r63 = frame_info.regs.r31;
|
||||||
}
|
}
|
||||||
|
|
||||||
return address; /* return the last address it saw */
|
return address; /* return the last address it saw */
|
||||||
|
|
Loading…
Reference in New Issue