aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2019-11-22 15:53:30 +0100
committerVasily Gorbik <gor@linux.ibm.com>2019-11-30 10:52:45 +0100
commit67f5593419878798bb306632cdca0698a2dd3cbd (patch)
tree826f37ffccd07833374d5f17d6befc2aff05ebb4
parents390: avoid misusing CALL_ON_STACK for task stack setup (diff)
downloadlinux-dev-67f5593419878798bb306632cdca0698a2dd3cbd.tar.xz
linux-dev-67f5593419878798bb306632cdca0698a2dd3cbd.zip
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: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r--arch/s390/kernel/unwind_bc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/unwind_bc.c b/arch/s390/kernel/unwind_bc.c
index fa111d3d378f..fd90b6e21663 100644
--- a/arch/s390/kernel/unwind_bc.c
+++ b/arch/s390/kernel/unwind_bc.c
@@ -76,7 +76,7 @@ bool unwind_next_frame(struct unwind_state *state)
/* No back-chain, look for a pt_regs structure */
sp = state->sp + STACK_FRAME_OVERHEAD;
if (!on_stack(info, sp, sizeof(struct pt_regs)))
- goto out_stop;
+ goto out_err;
regs = (struct pt_regs *) sp;
if (READ_ONCE_NOCHECK(regs->psw.mask) & PSW_MASK_PSTATE)
goto out_stop;