Skip to content

Commit e4b98e2

Browse files
hcahcagregkh
authored andcommitted
s390/smp: __smp_rescan_cpus() - move cpumask away from stack
[ 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>
1 parent 219fc4b commit e4b98e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/s390/kernel/smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ static int smp_add_core(struct sclp_core_entry *core, cpumask_t *avail,
775775
static int __smp_rescan_cpus(struct sclp_core_info *info, bool early)
776776
{
777777
struct sclp_core_entry *core;
778-
cpumask_t avail;
778+
static cpumask_t avail;
779779
bool configured;
780780
u16 core_id;
781781
int nr, i;

0 commit comments

Comments
 (0)