]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] sched: build_sched_domains() fix
authorSiddha, Suresh B <suresh.b.siddha@intel.com>
Sun, 30 Jul 2006 10:02:59 +0000 (03:02 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Jul 2006 20:28:36 +0000 (13:28 -0700)
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 <suresh.b.siddha@intel.com>
Reported-and-tested-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c

index b44b9a43b0fcadbe0745aafd876e2a17a7daa9d5..41a571806ce04b877451c768bc47e71bc6cbd5ab 100644 (file)
@@ -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 */