summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-02-17 07:13:02 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-17 16:43:46 +0100
commit9b2384daf9525492b325ab1310c46f71442b134d (patch)
treef466912c37125ba7bf7e12d8dd3a840e1cf5c523
parent105e4f983100d20029bf0afd7c15c4d55cc11b40 (diff)
downloadlinux-stable-9b2384daf9525492b325ab1310c46f71442b134d.tar.gz
linux-stable-9b2384daf9525492b325ab1310c46f71442b134d.tar.bz2
linux-stable-9b2384daf9525492b325ab1310c46f71442b134d.zip
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 <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/s390/kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index c47bd581a08a..bce678c7179c 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;