diff options
Diffstat (limited to 'kernel/drivers/pci/pci-sysfs.c')
-rw-r--r-- | kernel/drivers/pci/pci-sysfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/drivers/pci/pci-sysfs.c b/kernel/drivers/pci/pci-sysfs.c index 312f23a84..eead54cd0 100644 --- a/kernel/drivers/pci/pci-sysfs.c +++ b/kernel/drivers/pci/pci-sysfs.c @@ -216,7 +216,10 @@ static ssize_t numa_node_store(struct device *dev, if (ret) return ret; - if (!node_online(node)) + if ((node < 0 && node != NUMA_NO_NODE) || node >= MAX_NUMNODES) + return -EINVAL; + + if (node != NUMA_NO_NODE && !node_online(node)) return -EINVAL; add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK); |