mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 14:20:50 +07:00
NVMe: Use pci_stop_and_remove_bus_device_locked()
Race conditions are theoretically possible between the NVMe PCI device removal and the generic PCI bus rescan and device removal that can be triggered via sysfs. To avoid those race conditions make the NVMe code use pci_stop_and_remove_bus_device_locked(). Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
badc34d415
commit
c81f49758a
@ -2759,7 +2759,7 @@ static int nvme_remove_dead_ctrl(void *arg)
|
||||
struct pci_dev *pdev = dev->pci_dev;
|
||||
|
||||
if (pci_get_drvdata(pdev))
|
||||
pci_stop_and_remove_bus_device(pdev);
|
||||
pci_stop_and_remove_bus_device_locked(pdev);
|
||||
kref_put(&dev->kref, nvme_free_dev);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user