[PATCH] NVMe: Fix hot cpu registration deadlock
Keith Busch
keith.busch at intel.com
Mon May 26 00:52:37 PDT 2014
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(-)
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index cd8a8bc7..fa14deb 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -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;
--
1.7.10.4
More information about the Linux-nvme
mailing list