summaryrefslogtreecommitdiff
path: root/kernel/time
diff options
context:
space:
mode:
authorTang Chen <tangchen@cn.fujitsu.com>2012-09-25 21:12:30 +0800
committerIngo Molnar <mingo@kernel.org>2012-10-05 13:54:46 +0200
commit5f7865f3e44db4c73fdc454fb2af40806212a7ca (patch)
tree279a1f2588b875019c80e2ae779bd66bb6544137 /kernel/time
parent2b17c545a4cdbbbadcd7f1e9684c2d7db8f085a6 (diff)
sched: Ensure 'sched_domains_numa_levels' is safe to use in other functions
We should temporarily reset 'sched_domains_numa_levels' to 0 after it is reset to 'level' in sched_init_numa(). 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. This patch set sched_domains_numa_levels to 0 before initializing array sched_domains_numa_masks[][], and reset it to 'level' when sched_domains_numa_masks[][] is fully initialized. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1348578751-16904-2-git-send-email-tangchen@cn.fujitsu.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time')
0 files changed, 0 insertions, 0 deletions