Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333863
b: refs/heads/master
c: 5f7865f
h: refs/heads/master
i:
  333861: 9253240
  333859: 212c481
  333855: 88ced72
v: v3
  • Loading branch information
Tang Chen authored and Ingo Molnar committed Oct 5, 2012
1 parent da348d7 commit dbab111
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b17c545a4cdbbbadcd7f1e9684c2d7db8f085a6
refs/heads/master: 5f7865f3e44db4c73fdc454fb2af40806212a7ca
13 changes: 13 additions & 0 deletions trunk/kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6122,6 +6122,17 @@ static void sched_init_numa(void)
* numbers.
*/

/*
* Here, we should temporarily reset sched_domains_numa_levels to 0.
* If it fails to allocate memory for array sched_domains_numa_masks[][],
* the array will contain less then 'level' members. This could be
* dangerous when we use it to iterate array sched_domains_numa_masks[][]
* in other functions.
*
* We reset it to 'level' at the end of this function.
*/
sched_domains_numa_levels = 0;

sched_domains_numa_masks = kzalloc(sizeof(void *) * level, GFP_KERNEL);
if (!sched_domains_numa_masks)
return;
Expand Down Expand Up @@ -6176,6 +6187,8 @@ static void sched_init_numa(void)
}

sched_domain_topology = tl;

sched_domains_numa_levels = level;
}
#else
static inline void sched_init_numa(void)
Expand Down

0 comments on commit dbab111

Please sign in to comment.