PCI: Check the node argument passed to cpumask_of_node
authorDavid John <davidjon@xenontk.org>
Mon, 4 Jan 2010 14:58:57 +0000 (20:28 +0530)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 4 Jan 2010 23:10:56 +0000 (15:10 -0800)
Commit e0cd516 "PCI: derive nearby CPUs from device's instead of bus'
NUMA information" causes an null pointer dereference when reading from
the sysfs attributes local_cpu* on Intel machines with no ACPI NUMA
proximity info, since dev->numa_node gets set to -1 for all PCI devices,
which then gets passed to cpumask_of_node.

Add a check to prevent this.

Signed-off-by: David John <davidjon@xenontk.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

No differences found