]> err.no Git - linux-2.6/commitdiff
x86: don't return invalid pointers from node_to_cpumask()
authorVegard Nossum <vegard.nossum@gmail.com>
Fri, 6 Jun 2008 14:33:25 +0000 (16:33 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 09:31:31 +0000 (11:31 +0200)
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/setup.c

index dd12c1c84a8fcd8179df2cfb02412ff349def4de..df49ce87a3003dab9d589857e9bbce3183c1c2b0 100644 (file)
@@ -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);