]> asedeno.scripts.mit.edu Git - linux.git/commit
s390: correct CALL_ON_STACK back_chain saving
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 22 Nov 2019 11:47:52 +0000 (12:47 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Sat, 30 Nov 2019 09:52:45 +0000 (10:52 +0100)
commit7579425777c0d802237e0d59ae395e8cf60723e1
tree078c05f1f27abf642cfc33b6987ff7cadd39266a
parent103b4cca60d2c8c51f1290cc984b7046ccb8b46d
s390: correct CALL_ON_STACK back_chain saving

Currently CALL_ON_STACK saves r15 as back_chain in the first stack frame of
the stack we about to switch to. But if a function which uses CALL_ON_STACK
calls other function it allocates a stack frame for a callee. In this
case r15 is pointing to a callee stack frame and not a stack frame of
function itself. This results in dummy unwinding entry with random
sp and ip values.

Introduce and utilize current_frame_address macro to get an address of
actual function stack frame.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/stacktrace.h