Skip to content

Commit

Permalink
[PATCH] sched: build_sched_domains() fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Siddha, Suresh B authored and Linus Torvalds committed Jul 31, 2006
1 parent b6ff508 commit f712c0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f712c0c

Please sign in to comment.