linux-stable/drivers/nvme/target
James Smart 6c786e656c nvme_fc: add module to ops template to allow module references
[ Upstream commit 863fbae929 ]

In nvme-fc: it's possible to have connected active controllers
and as no references are taken on the LLDD, the LLDD can be
unloaded.  The controller would enter a reconnect state and as
long as the LLDD resumed within the reconnect timeout, the
controller would resume.  But if a namespace on the controller
is the root device, allowing the driver to unload can be problematic.
To reload the driver, it may require new io to the boot device,
and as it's no longer connected we get into a catch-22 that
eventually fails, and the system locks up.

Fix this issue by taking a module reference for every connected
controller (which is what the core layer did to the transport
module). Reference is cleared when the controller is removed.

Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-09 10:18:54 +01:00
..
admin-cmd.c nvmet: fix data units read and written counters in SMART log 2019-10-05 13:09:52 +02:00
configfs.c
core.c nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-05-08 07:21:44 +02:00
discovery.c
fabrics-cmd.c
fc.c
fcloop.c nvme_fc: add module to ops template to allow module references 2020-01-09 10:18:54 +01:00
io-cmd-bdev.c nvmet: fix data_len to 0 for bdev-backed write_zeroes 2019-06-25 11:35:58 +08:00
io-cmd-file.c nvmet: avoid integer overflow in the discard code 2019-12-01 09:16:29 +01:00
Kconfig
loop.c nvmet-loop: Flush nvme_delete_wq when removing the port 2019-09-06 10:21:55 +02:00
Makefile
nvmet.h
rdma.c nvmet-rdma: fix null dereference under heavy load 2019-01-31 08:14:41 +01:00