+4
−3
Loading
During qpair destruction, if recv_state == NVME_TCP_PDU_RECV_STATE_AWAIT_REQ, and nvmf_tcp_qpair_set_recv_state() is called after nvmf_tcp_poll_group_remove(), the tqpair is incorrectly removed (again) from the await req list and added to the spdk_nvmf_tcp_poll_group qpairs list before being freed. Later, adding a new qpair to the list causes dereferencing a pointer to the freed item. Prevent this by ensuring the recv_state is not NVME_TCP_PDU_RECV_STATE_AWAIT_REQ before removing the qpair from the poll group. Fixes #3208 Change-Id: I945b5f3993ca0c81a065aa6dc99e3f80d0cf88a2 Signed-off-by:Artur Paszkiewicz <artur.paszkiewicz@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21072 Reviewed-by:
Jim Harris <jim.harris@samsung.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Vasuki Manikarnike <vasuki.manikarnike@hpe.com> Reviewed-by:
Ben Walker <ben@nvidia.com> Community-CI: Mellanox Build Bot