Commit ab9e69a3 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Handle empty nodes in sysfs on x86-64

This code is shared between i386 and x86-64, and x86-64 needs to check
for empty nodes here.  Otherwise you can get oopses at boot in some
circumstances. 

This handles empty nodes != 0; empty node zero are still broken in other
ways.
parent f1eda416
......@@ -17,7 +17,11 @@ static inline int arch_register_cpu(int num){
struct node *parent = NULL;
#ifdef CONFIG_NUMA
parent = &node_devices[cpu_to_node(num)].node;
int node = cpu_to_node(num);
if (!node_online(node))
return 0;
parent = &node_devices[node].node;
#endif /* CONFIG_NUMA */
return register_cpu(&cpu_devices[num].cpu, num, parent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment