Spdk/lib
Peng Lian b13ee3005d nvmf: clean sgroup->queued in _nvmf_qpair_destroy when ctrlr is NULL
Let us consider the following process:
  1. one fabric connect request A comes but the subsystem is paused
     due to adding/removing ns or other operations, so this request A
     will be put into sgroup->queued until the subsystem becomes active;
  2. the subsystem is paused for a long time until the connect timeout,
     related qpair is destroyed, the sgroup->queued will not be cleaned
     because qpair's ctrlr is NULL;
  3. if a new request B comes, it is more likely to be allocated to the
     same memory as the previous fabric command request. And it will be
     put into sgroup->queued again, where has already exists the exactly
     same pointer with request B.

This leads to the pointer hanging problem and it will cause infinitely
loop when traversing sgroup->queued!

So this patch avoids the ptr-hanging problem by checking and cleaning
all sgroups queued req whose qpair is the being destroyed qpair in
_nvmf_qpair_destroy when ctrlr is NULL.

This problem is already described in issue #2133.

Signed-off-by: Peng Lian<peng.lian@smartx.com>
Change-Id: I909d673b5050f21fa193914cc4ffe6634232fa7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17147
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-03-22 10:11:30 +00:00
..
accel accel: don't modify user iovs when allocating buffers 2023-03-13 21:02:27 +00:00
bdev bdev: prevent aborting reqs doing push/pull or accel seq exec 2023-03-13 21:02:27 +00:00
blob blob: add spdk_blob_is_esnap_clone 2023-03-22 09:39:29 +00:00
blobfs so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
conf so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
dma so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
env_dpdk env: expose function to get main core 2023-01-31 10:31:04 +00:00
env_ocf ocf: fix env_ticks_to_{msec,usec,nsec} precision & accuracy 2023-03-21 19:08:59 +00:00
event trace: update description of tracepoint number 2023-03-10 11:42:23 +00:00
ftl so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
idxd lib/idxd: Removed SPDK_IDXD_FLAG_PERSISTENT flag 2023-03-03 11:20:03 +00:00
init so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
ioat so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
iscsi freebsd: return negated error from getaddrinfo() 2023-03-10 16:44:37 +00:00
json so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
jsonrpc freebsd: return negated error from getaddrinfo() 2023-03-10 16:44:37 +00:00
log so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
lvol bdev/lvol: retry lvol open if it fails due to insufficient resources 2023-02-24 21:01:11 +00:00
mlx5 so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
nbd so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
notify so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
nvme lib/nvme_rdma: return negated error from nvme_rdma_parse_addr 2023-03-10 16:44:37 +00:00
nvmf nvmf: clean sgroup->queued in _nvmf_qpair_destroy when ctrlr is NULL 2023-03-22 10:11:30 +00:00
rdma so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
reduce deprecation: Remove support for PMDK 2023-01-26 15:16:19 +00:00
rocksdb rocksdb: remove spdk_thread 2022-11-23 08:22:04 +00:00
rpc so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
scsi so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
sock sock: Allow flushing even if the socket is in a poll group 2023-01-24 18:18:33 +00:00
thread thread: Add spdk_thread_get_interrupt_fd_group that returns spdk_fd_group 2023-02-28 08:52:27 +00:00
trace so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
trace_parser so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
ublk ublk: update func ublk_try_close_dev 2023-02-08 15:26:00 +00:00
ut_mock so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
util util: fix misaligned load for uint64_t type 2023-03-01 08:56:01 +00:00
vfio_user so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
vfu_tgt so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
vhost vhost_rpc:add sessions information for vhost_get_controllers 2023-03-13 07:59:08 +00:00
virtio lib/virtio_vfio_user: use VIRTIO_PCI_VRING_ALIGN aligned vring address 2023-02-09 11:31:39 +00:00
vmd so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
Makefile ublk: add configure and event/subsystem 2023-01-20 07:48:25 +00:00