diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2019-10-02 14:29:57 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-10-31 19:26:48 +0300 |
commit | a1d863ac3e1085e1fea9caafd87252d08731de2e (patch) | |
tree | 792a0fa48c6c5b0c061c3bdd082f6867c54665f0 /arch/s390/include/asm | |
parent | b8e51a6a9db94bc1fb18ae831b3dab106b5a4b5f (diff) | |
download | linux-a1d863ac3e1085e1fea9caafd87252d08731de2e.tar.xz |
s390/unwind: fix mixing regs and sp
unwind_for_each_frame stops after the first frame if regs->gprs[15] <=
sp.
The reason is that in case regs are specified, the first frame should be
regs->psw.addr and the second frame should be sp->gprs[8]. However,
currently the second frame is regs->gprs[15], which confuses
outside_of_stack().
Fix by introducing a flag to distinguish this special case from
unwinding the interrupt handler, for which the current behavior is
appropriate.
Fixes: 78c98f907413 ("s390/unwind: introduce stack unwind API")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: stable@vger.kernel.org # v5.2+
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r-- | arch/s390/include/asm/unwind.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/include/asm/unwind.h b/arch/s390/include/asm/unwind.h index d827b5b9a32c..eaaefeceef6f 100644 --- a/arch/s390/include/asm/unwind.h +++ b/arch/s390/include/asm/unwind.h @@ -35,6 +35,7 @@ struct unwind_state { struct task_struct *task; struct pt_regs *regs; unsigned long sp, ip; + bool reuse_sp; int graph_idx; bool reliable; bool error; |