linux/drivers/nvme/host
Keith Busch 5c959d73db nvme-pci: fix rapid add remove sequence
A surprise removal may fail to tear down request queues if it is racing
with the initial asynchronous probe. If that happens, the remove path
won't see the queue resources to tear down, and the controller reset
path may create a new request queue on a removed device, but will not
be able to make forward progress, deadlocking the pci removal.

Protect setting up non-blocking resources from a shutdown by holding the
same mutex, and transition to the CONNECTING state after these resources
are initialized so the probe path may see the dead controller state
before dispatching new IO.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=202081
Reported-by: Alex Gagniuc <Alex_Gagniuc@Dellteam.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Tested-by: Alex Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-02-06 16:35:33 +01:00
..
core.c nvme: lock NS list changes while handling command effects 2019-02-06 16:35:33 +01:00
fabrics.c nvme-fabrics: unset write/poll queues for discovery controllers 2019-01-09 13:47:06 -05:00
fabrics.h nvme-fabrics: allow user to pass in nr_poll_queues 2018-12-18 17:50:49 +01:00
fault_inject.c nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
fc.c nvme-fabrics: allow nvmf_connect_io_queue to poll 2018-12-18 17:50:48 +01:00
Kconfig nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
lightnvm.c nvme: remove nvme_common command cdw10 array 2018-12-13 09:59:01 +01:00
Makefile nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
multipath.c nvme-multipath: drop optimization for static ANA group IDs 2019-01-23 17:16:59 -07:00
nvme.h nvme: lock NS list changes while handling command effects 2019-02-06 16:35:33 +01:00
pci.c nvme-pci: fix rapid add remove sequence 2019-02-06 16:35:33 +01:00
rdma.c nvme-rdma: rework queue maps handling 2019-01-23 17:16:59 -07:00
tcp.c nvme-tcp: fix timeout handler 2019-01-23 17:16:59 -07:00
trace.c nvme-pci: trace SQ status on completions 2018-12-19 08:35:36 +01:00
trace.h nvme-pci: trace SQ status on completions 2018-12-19 08:35:36 +01:00