linux_dsm_epyc7002/drivers/nvme/target
Logan Gunthorpe 86b9a63e59 nvmet-loop: Flush nvme_delete_wq when removing the port
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>
2019-07-31 17:57:17 -07:00
..
admin-cmd.c nvmet: export I/O characteristics attributes in Identify 2019-07-09 14:15:37 -07:00
configfs.c nvmet: Fix use-after-free bug when a port is removed 2019-07-31 17:57:06 -07:00
core.c nvmet: Fix use-after-free bug when a port is removed 2019-07-31 17:57:06 -07:00
discovery.c nvmet: add transport discovery change op 2019-06-21 11:08:37 +02:00
fabrics-cmd.c nvme: introduce nvme_is_fabrics to check fabrics cmd 2019-06-21 11:08:38 +02:00
fc.c nvme: introduce nvme_is_fabrics to check fabrics cmd 2019-06-21 11:08:38 +02:00
fcloop.c nvme-fcloop: resolve warnings on RCU usage and sleep warnings 2019-07-09 13:16:09 -07:00
io-cmd-bdev.c nvmet: export I/O characteristics attributes in Identify 2019-07-09 14:15:37 -07:00
io-cmd-file.c nvmet-file: clamp-down file namespace lba_shift 2019-04-25 16:51:19 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
loop.c nvmet-loop: Flush nvme_delete_wq when removing the port 2019-07-31 17:57:17 -07:00
Makefile nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00
nvmet.h nvmet: Fix use-after-free bug when a port is removed 2019-07-31 17:57:06 -07:00
rdma.c nvmet: rename nvme_completion instances from rsp to cqe 2019-04-25 16:41:26 +02:00
tcp.c nvmet-tcp: don't fail maxr2t greater than 1 2019-04-25 16:51:19 +02:00
trace.c nvme-trace: fix spelling mistake "spcecific" -> "specific" 2019-07-09 13:44:45 -07:00
trace.h nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00