diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index f2951eba9592..ff2c6d3ba6c7 100644 --- 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++); - tl = kzalloc((i + nr_levels) * + tl = kzalloc((i + nr_levels + 1) * sizeof(struct sched_domain_topology_level), GFP_KERNEL); if (!tl) return;