Spdk/lib/nvmf
Alexey Marchuk ae8a1c5805 nvmf: Update controller desctruction process
There is a race condition between controller destruction and
subsystem state change, e.g. admin qpair may already be freed
when a namespace is added or removed. As result in function
poll_group_update_subsystem we may get heap-use-after-free error

Another problem is that some qpair's live time may exceed controller's
life time. To avoid it, start controller destruction process when the last
qpair finished the disconnect process (previously controller started
the descruction process before the last qpair starts to disconnect
and it could lead to raise conditions)

Fixes #2055

Change-Id: I11612979eb914a5fdcc7b9e3c812bf1e450b6120
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8963
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Matt Dumm <matt.dumm@hpe.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-06-30 13:32:27 -04:00
..
ctrlr_bdev.c nvmf: make fused status construction easier to understand 2022-06-30 13:32:26 -04:00
ctrlr_discovery.c nvmf: remove a bdev_module.h #include 2021-05-11 11:57:01 +00:00
ctrlr.c nvmf: Update controller desctruction process 2022-06-30 13:32:27 -04:00
fc_ls.c nvmf/fc: Handle out of order fused commands. 2021-01-14 16:18:25 +00:00
fc.c trace: shorten tpoint names 2022-06-30 13:32:27 -04:00
Makefile nvmf/vfio-user: don't set RESERVATION support for vfio-user transport 2021-08-25 07:27:10 +00:00
nvmf_fc.h nvmf/fc: Add flag to differentiate LS queue and non LS queue. 2021-01-14 16:18:25 +00:00
nvmf_internal.h nvmf: consolidate CC reset and shutdown 2022-06-30 13:32:26 -04:00
nvmf_rpc.c nvmf/rpc: Put channel refcount after nvmf_subsystem_get_qpairs use 2022-06-30 13:32:26 -04:00
nvmf.c nvmf: Update controller desctruction process 2022-06-30 13:32:27 -04:00
rdma.c trace: move all trace definitions to a separate file 2022-06-30 13:32:26 -04:00
spdk_nvmf.map lib/nvmf : Added support for ZCOPY 2021-07-23 08:34:43 +00:00
subsystem.c nvmf: Update controller desctruction process 2022-06-30 13:32:27 -04:00
tcp.c trace: shorten tpoint names 2022-06-30 13:32:27 -04:00
transport.c nvmf: add interface to dump transport specific listen opts 2021-09-06 09:53:57 +00:00
transport.h nvmf: Allow nvmf_transport_qpair_fini to complete asynchronously. 2020-11-18 11:28:02 +00:00
vfio_user.c nvmf/vfio-user: fix empty free request issue 2022-06-30 13:32:26 -04:00