diff options
author | Vegard Nossum <vegard.nossum@gmail.com> | 2008-06-06 16:33:25 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 11:31:31 +0200 |
commit | 03db1f74a7d823e3de3767f36b1e08829f6fb3a1 (patch) | |
tree | f2b8e0025adc7383f79c6a861cad04b19d308db8 /arch/x86 | |
parent | 076ac2af86c3b7f89ac31bc50a7508d3e035b786 (diff) | |
download | talos-op-linux-03db1f74a7d823e3de3767f36b1e08829f6fb3a1.tar.gz talos-op-linux-03db1f74a7d823e3de3767f36b1e08829f6fb3a1.zip |
x86: don't return invalid pointers from node_to_cpumask()
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/setup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index dd12c1c84a8f..df49ce87a300 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -350,6 +350,7 @@ cpumask_t *_node_to_cpumask_ptr(int node) dump_stack(); return &cpu_online_map; } + BUG_ON(node >= nr_node_ids); return &node_to_cpumask_map[node]; } EXPORT_SYMBOL(_node_to_cpumask_ptr); @@ -365,6 +366,7 @@ cpumask_t node_to_cpumask(int node) dump_stack(); return cpu_online_map; } + BUG_ON(node >= nr_node_ids); return node_to_cpumask_map[node]; } EXPORT_SYMBOL(node_to_cpumask); |