Commit 67f55934 authored by Vasily Gorbik's avatar Vasily Gorbik

s390/unwind: report an error if pt_regs are not on stack

If unwinder is looking at pt_regs which is not on stack then something
went wrong and an error has to be reported rather than successful
unwinding termination.
Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 7bcaad1f
...@@ -76,7 +76,7 @@ bool unwind_next_frame(struct unwind_state *state) ...@@ -76,7 +76,7 @@ bool unwind_next_frame(struct unwind_state *state)
/* No back-chain, look for a pt_regs structure */ /* No back-chain, look for a pt_regs structure */
sp = state->sp + STACK_FRAME_OVERHEAD; sp = state->sp + STACK_FRAME_OVERHEAD;
if (!on_stack(info, sp, sizeof(struct pt_regs))) if (!on_stack(info, sp, sizeof(struct pt_regs)))
goto out_stop; goto out_err;
regs = (struct pt_regs *) sp; regs = (struct pt_regs *) sp;
if (READ_ONCE_NOCHECK(regs->psw.mask) & PSW_MASK_PSTATE) if (READ_ONCE_NOCHECK(regs->psw.mask) & PSW_MASK_PSTATE)
goto out_stop; goto out_stop;
......
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