linux/drivers/nvme/host
James Smart d625d05ef0 nvme-fc: fix rogue admin cmds stalling teardown
When connectivity is lost to a device, the association is terminated
and the blk-mq queues are quiesced/stopped. When connectivity is
re-established, they are resumed.

If an admin command is received while connectivity is list, the ioctl
queues the command on the admin_q and the command stalls (the thread
issuing the ioctl hangs/waits). if the connectivity is lost long
enough such that the controller is then deleted, the delete code
makes its calls to initiate the delete, which then expects the core
layer to call the transport when all references are removed and the
controller can be freed.  Unfortunately, nothing in this path dequeued
the admin command, so a reference sits outstanding and things stop,
hanging the delete indefinitely.

Correct by unquiescing the admin queue in the delete association. This
means any admin command (which should only be from an ioctl) issued
after connectivity is lost will detect the controller is in a
reconnecting state and will (fast) fail the command. Thus, a pending
reference can no longer be created.  Once connectivity is re-established,
a new ioctl/admin command would see proper device state and function again.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-01-17 17:54:49 +01:00
..
core.c nvme: host delete_work and reset_work on separate workqueues 2018-01-15 17:09:30 +01:00
fabrics.c nvme-fabrics: fix memory leak when parsing host ID option 2018-01-15 17:09:31 +01:00
fabrics.h nvme-fabrics: protect against module unload during create_ctrl 2018-01-08 11:01:56 +01:00
fc.c nvme-fc: fix rogue admin cmds stalling teardown 2018-01-17 17:54:49 +01:00
Kconfig nvme: implement multipath access to nvme subsystems 2017-11-10 19:53:25 -07:00
lightnvm.c lightnvm: make geometry structures 2.0 ready 2018-01-05 08:50:12 -07:00
Makefile Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block 2017-11-14 15:32:19 -08:00
multipath.c nvme/multipath: Use blk_path_error 2018-01-10 10:52:18 -07:00
nvme.h nvme: host delete_work and reset_work on separate workqueues 2018-01-15 17:09:30 +01:00
pci.c nvme: fix comment typos in nvme_create_io_queues 2018-01-15 17:09:30 +01:00
rdma.c nvme: host delete_work and reset_work on separate workqueues 2018-01-15 17:09:30 +01:00