s390/smp: smp_emergency_stop() - move cpumask away from stack
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 17 Feb 2021 06:19:09 +0000 (07:19 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 23 Feb 2021 23:31:22 +0000 (00:31 +0100)
commitf213e5502d2e68f141a4e3faadffd03000224192
tree793cc80cab0f72c41585ceaee890088e053cbfb9
parent62c8dca9e194326802b43c60763f856d782b225c
s390/smp: smp_emergency_stop() - move cpumask away from stack

Make "cpumask_t cpumask" a static variable to avoid a potential large
stack frame. Also protect against potential concurrent callers by
introducing a local lock.
Note: smp_emergency_stop() gets only called with irqs and machine
checks disabled, therefore a cpu local deadlock is not possible. For
concurrent callers the first cpu which enters the critical section
wins and will stop all other cpus.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/smp.c