Skip to content

Commit

Permalink
s390/smp: __smp_rescan_cpus() - move cpumask away from stack
Browse files Browse the repository at this point in the history
[ Upstream commit 62c8dca ]

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>
  • Loading branch information
hcahca authored and gregkh committed Mar 17, 2021
1 parent 54fc6a5 commit 508d56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/smp.c
Expand Up @@ -765,7 +765,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;
Expand Down

0 comments on commit 508d56e

Please sign in to comment.