nvmf/tcp: unregister timeout poller in qpair_destroy

The timeout poller might still be registered when a qpair is destroyed
if we send C2HTermReq and then destroy the qpair before host terminates
the connection.

Fixes #2527

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I21acc147fdba3aaac66b0c6ed54e155195fe9816
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12844
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
Konrad Sztyber 2022-05-31 13:20:15 +02:00 committed by Tomasz Zawadzki
parent 3a82f5fa22
commit 14adf7f70f

View File

@ -552,6 +552,10 @@ _nvmf_tcp_qpair_destroy(void *_tqpair)
nvmf_tcp_dump_qpair_req_contents(tqpair);
}
/* The timeout poller might still be registered here if we close the qpair before host
* terminates the connection.
*/
spdk_poller_unregister(&tqpair->timeout_poller);
spdk_dma_free(tqpair->pdus);
free(tqpair->reqs);
spdk_free(tqpair->bufs);