kernel-fxtec-pro1x/drivers/nvme/target
James Smart 6c786e656c nvme_fc: add module to ops template to allow module references
[ Upstream commit 863fbae929c7a5b64e96b8a3ffb34a29eefb9f8f ]

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 for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
core.c nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-05-08 07:21:44 +02:00
discovery.c nvmet-rdma: support max(16KB, PAGE_SIZE) inline data 2018-07-23 09:35:16 +02:00
fabrics-cmd.c nvmet: remove duplicate NULL initialization for req->ns 2018-05-25 16:50:12 +02:00
fc.c nvmet-fc: fix target sgl list on large transfers 2018-07-24 13:44:09 +02:00
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 nvmet-rdma: depend on INFINIBAND_ADDR_TRANS 2018-04-27 11:15:43 -04:00
loop.c nvmet-loop: Flush nvme_delete_wq when removing the port 2019-09-06 10:21:55 +02:00
Makefile nvmet: add simple file backed ns support 2018-05-25 16:50:12 +02:00
nvmet.h nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
rdma.c nvmet-rdma: fix null dereference under heavy load 2019-01-31 08:14:41 +01:00