Re: [PATCH 5.10+5.4 2/3] sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa()

From: Joe Perches
Date: Sat Mar 05 2022 - 12:25:18 EST


On Sat, 2022-03-05 at 09:13 -0800, Joe Perches wrote:
> On Sat, 2022-03-05 at 09:44 -0700, dann frazier wrote:
> > From: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
> >
> > commit 71e5f6644fb2f3304fcb310145ded234a37e7cc1 upstream.
> >
> > Commit "sched/topology: Make sched_init_numa() use a set for the
> > deduplicating sort" allocates 'i + nr_levels (level)' instead of
> > 'i + nr_levels + 1' sched_domain_topology_level.
> []
> > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> []
> > @@ -1655,7 +1655,7 @@ void sched_init_numa(void)
> > /* Compute default topology size */
> > for (i = 0; sched_domain_topology[i].mask; i++);
>
> Thanks.

Oops. Didn't notice this was for a stable backport.