mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
sched/topology: Fix off by one bug
[ Upstream commit993f0b0510] With the addition of the NUMA identity level, we increased @level by one and will run off the end of the array in the distance sort loop. Fixed:051f3ca02e("sched/topology: Introduce NUMA identity node sched domain") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f9fca78e6c
commit
ed023646c2
|
|
@ -1329,7 +1329,7 @@ void sched_init_numa(void)
|
|||
int level = 0;
|
||||
int i, j, k;
|
||||
|
||||
sched_domains_numa_distance = kzalloc(sizeof(int) * nr_node_ids, GFP_KERNEL);
|
||||
sched_domains_numa_distance = kzalloc(sizeof(int) * (nr_node_ids + 1), GFP_KERNEL);
|
||||
if (!sched_domains_numa_distance)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user