s390: avoid misusing CALL_ON_STACK for task stack setup
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 22 Nov 2019 12:12:57 +0000 (13:12 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Sat, 30 Nov 2019 09:52:45 +0000 (10:52 +0100)
commit7bcaad1f9fac889f5fcd1a383acf7e00d006da41
treeaf2851175e748e5dbee515c9e7ab8369b43ffc00
parent7579425777c0d802237e0d59ae395e8cf60723e1
s390: avoid misusing CALL_ON_STACK for task stack setup

CALL_ON_STACK is intended to be used for temporary stack switching with
potential return to the caller.

When CALL_ON_STACK is misused to switch from nodat stack to task stack
back_chain information would later lead stack unwinder from task stack into
(per cpu) nodat stack which is reused for other purposes. This would
yield confusing unwinding result or errors.

To avoid that introduce CALL_ON_STACK_NORETURN to be used instead. It
makes sure that back_chain is zeroed and unwinder finishes gracefully
ending up at task pt_regs.

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