Skip to contentSkip to conversation

NVMe: Fix hot cpu registration deadlock

PATCH New Keith Busch 1 participant 1 message May 26, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index cd8a8bc7..fa14deb 100644
@@ -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