Fix oops on non-numa enabled systems
Some systems aren't numa enabled, but still have devices that indicate they belong to numa node 0 (rather than -1 as they should). Thats a kernel problem but we still shouldn't crash as a result (which we will when device get a NULL numa_node pointer as a result of trying to find non-existant node 0). This patch fixes the crash by always returning the unspecified node pointer when numa is disabled Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
This commit is contained in:
parent
4cdd2040a7
commit
effc540808
|
@ -281,7 +281,7 @@ struct irq_info *add_misc_irq(int irq)
|
||||||
new->irq = irq;
|
new->irq = irq;
|
||||||
new->type = IRQ_TYPE_LEGACY;
|
new->type = IRQ_TYPE_LEGACY;
|
||||||
new->class = IRQ_OTHER;
|
new->class = IRQ_OTHER;
|
||||||
new->numa_node = get_numa_node(0);
|
new->numa_node = get_numa_node(-1);
|
||||||
interrupts_db = g_list_append(interrupts_db, new);
|
interrupts_db = g_list_append(interrupts_db, new);
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ extern GList *numa_nodes;
|
||||||
extern GList *packages;
|
extern GList *packages;
|
||||||
extern GList *cache_domains;
|
extern GList *cache_domains;
|
||||||
extern GList *cpus;
|
extern GList *cpus;
|
||||||
|
extern int numa_avail;
|
||||||
|
|
||||||
enum hp_e {
|
enum hp_e {
|
||||||
HINT_POLICY_IGNORE,
|
HINT_POLICY_IGNORE,
|
||||||
|
|
Loading…
Reference in a new issue