+13
−9
Loading
In the situation where a fabric command (either connect or auth) is outstanding and the qpair is disconnected, the associated fabric_poll_status can be leaked since no entity is polling the qpair to invoke nvme_tcp_ctrlr_connect_qpair_poll and release it. This situation occurs in the test where the target adds a namespace(s) and there are at least two paths. On the initiator side, the first controller is notified about the namespace via an AER and the nbdev channel is opened for examine purposes. While the examine is happening, the second controller is also notified about the namespace and opens an I/O channel (adds io path to existing nbdev channel). The first controller is able to finalize the TCP connect, fabric connect, and examine steps, whereas the second controller is still in progress. When the examine completes, the nbdev channel is released and the controllers’ channels are also released (delete paths is causing disconnects), while the second controller has not yet completed the fabric connect. Most likely, other scenarios exist where this leak can occur. This fix aims for generic solution hence move similar handling of possible leak from nvme_tcp_qpair_process_completions to nvme_tcp_ctrlr_disconnect_qpair. There is also dma_data leak in such situation but unfortunately such spdk/dpdk allocations are not reported by asan. Change-Id: I87f66efc9d7ec3a49e9bae18f9d4fbb378975d60 Signed-off-by:Jacek Kalwas <jacek.kalwas@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26479 Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Tomasz Zawadzki <tomasz@tzawadzki.com>