kernel-fxtec-pro1x/drivers/nvme/target
Logan Gunthorpe 32c0b8f103 nvmet-loop: Flush nvme_delete_wq when removing the port
[ Upstream commit 86b9a63e595ff03f9d0a7b92b6acc231fecefc29 ]

After calling nvme_loop_delete_ctrl(), the controllers will not
yet be deleted because nvme_delete_ctrl() only schedules work
to do the delete.

This means a race can occur if a port is removed but there
are still active controllers trying to access that memory.

To fix this, flush the nvme_delete_wq before returning from
nvme_loop_remove_port() so that any controllers that might
be in the process of being deleted won't access a freed port.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by : Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-06 10:21:55 +02:00
..
admin-cmd.c nvme: count all ANA groups for ANA Log page 2018-09-17 15:49:40 +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-fcloop: Fix dropped LS's to removed target port 2018-08-28 08:40:43 +02: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: add ns write protect support 2018-08-08 12:00:53 +02: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