From f712c0c7e1796f92e45e4de144e247816d974b8f Mon Sep 17 00:00:00 2001 From: "Siddha, Suresh B" Date: Sun, 30 Jul 2006 03:02:59 -0700 Subject: [PATCH] [PATCH] sched: build_sched_domains() fix Use the correct groups while initializing sched groups power for allnodes_domain. This fixes the crash observed while creating exclusive cpusets. Signed-off-by: Suresh Siddha Reported-and-tested-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/sched.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/sched.c b/kernel/sched.c index b44b9a43b0..41a571806c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -6494,7 +6494,12 @@ static int build_sched_domains(const cpumask_t *cpu_map) for (i = 0; i < MAX_NUMNODES; i++) init_numa_sched_groups_power(sched_group_nodes[i]); - init_numa_sched_groups_power(sched_group_allnodes); + if (sched_group_allnodes) { + int group = cpu_to_allnodes_group(first_cpu(*cpu_map)); + struct sched_group *sg = &sched_group_allnodes[group]; + + init_numa_sched_groups_power(sg); + } #endif /* Attach the domains */ -- 2.39.5