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>
This commit is contained in:
Vegard Nossum 2008-06-06 16:33:25 +02:00 committed by Ingo Molnar
parent 076ac2af86
commit 03db1f74a7

View 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);