]> git.baikalelectronics.ru Git - kernel.git/commit
s390/unwind: fix mixing regs and sp
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 2 Oct 2019 11:29:57 +0000 (13:29 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 31 Oct 2019 16:26:48 +0000 (17:26 +0100)
commitaa9bb63f17469e5d778092657d3dc47abf434bf5
tree792a0fa48c6c5b0c061c3bdd082f6867c54665f0
parent21c368fca3e7c6112b0d90ca35f38e4e09bf5a91
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: ef2ec76e0480 ("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>
arch/s390/include/asm/unwind.h
arch/s390/kernel/unwind_bc.c