NVMe: Fix hot cpu registration deadlock
Subsystems (2)
PATCH 1/1 NVMe: Fix hot cpu registration deadlock
The pci-driver calls "get_online_cpus()", which grabs a reference, prior to the device driver's probe. This can deadlock the system if a cpu hot event occurs during the device driver's probe if it registers with cpu hotplug notification using the locked method. Use the lockless version instead to register the cpu notification.
Signed-off-by Keith Busch <keith.busch at intel.com>
--- drivers/block/nvme-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/nvme-core.c +1 -1
@@ -2163,7 +2163,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)nvme_assign_io_queues (dev); dev->nb.notifier_call = &nvme_cpu_notify; - result =register_hotcpu_notifier (&dev->nb); + result =__register_hotcpu_notifier (&dev->nb);if (result) goto free_queues;
Signature · 1 line
1.7.10.4