From: Heiko Carstens Date: Wed, 17 Feb 2021 06:13:02 +0000 (+0100) Subject: s390/smp: __smp_rescan_cpus() - move cpumask away from stack X-Git-Tag: v4.19.181~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b2384daf9525492b325ab1310c46f71442b134d;p=thirdparty%2Fkernel%2Fstable.git s390/smp: __smp_rescan_cpus() - move cpumask away from stack [ Upstream commit 62c8dca9e194326802b43c60763f856d782b225c ] Avoid a potentially large stack frame and overflow by making "cpumask_t avail" a static variable. There is no concurrent access due to the existing locking. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Sasha Levin --- diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index c47bd581a08a9..bce678c7179c8 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -751,7 +751,7 @@ static int smp_add_core(struct sclp_core_entry *core, cpumask_t *avail, static int __smp_rescan_cpus(struct sclp_core_info *info, bool early) { struct sclp_core_entry *core; - cpumask_t avail; + static cpumask_t avail; bool configured; u16 core_id; int nr, i;