]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: Fix async probe remove race
authorKeith Busch <kbusch@kernel.org>
Mon, 29 Jul 2019 22:34:52 +0000 (16:34 -0600)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 1 Aug 2019 01:03:36 +0000 (18:03 -0700)
commit0b9a670708e832deeb6c1d569fd0914372e744e4
tree1fe2f3a92c2bdc4a37ed5f20113f91355dcfff61
parent2779075a23e8daf47b827b170ba37c75c710a923
nvme-pci: Fix async probe remove race

Ensure the controller is not in the NEW state when nvme_probe() exits.
This will always allow a subsequent nvme_remove() to set the state to
DELETING, fixing a potential race between the initial asynchronous probe
and device removal.

Reported-by: Li Zhong <lizhongfs@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/pci.c