Skip to content

Commit

Permalink
x86: don't return invalid pointers from node_to_cpumask()
Browse files Browse the repository at this point in the history
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Vegard Nossum authored and Ingo Molnar committed Jul 8, 2008
1 parent 076ac2a commit 03db1f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 03db1f7

Please sign in to comment.