]> git.baikalelectronics.ru Git - kernel.git/commit
driver core / cpu: Check if NUMA node is valid before bringing CPU up
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 13 Aug 2013 00:39:30 +0000 (02:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Aug 2013 00:43:49 +0000 (17:43 -0700)
commit91ea13f3a9be38d1c8733ed5f555b315dccbad48
treef601b37ad472f0818c06e18fd9fa5a4d40d702bd
parentc525d04c7a2a9d7ac6cbf90b71b5295645512eeb
driver core / cpu: Check if NUMA node is valid before bringing CPU up

There is a potential race condition between cpu_subsys_online()
and either acpi_processor_remove() or remove_memory() that execute
try_offline_node().  Namely, it is possible that cpu_subsys_online()
will run right after the CPUs NUMA node has been put offline and
cpu_to_node() executed by it will return NUMA_NO_NODE (-1).  In
that case the CPU is gone and it doesn't make sense to call cpu_up()
for it, so make cpu_subsys_online() return -ENODEV then.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cpu.c