nvme-tcp: fix the memleak while create new ctrl failed

BugLink: https://bugs.launchpad.net/bugs/2102118

[ Upstream commit fec55c29e54d3ca6fe9d7d7d9266098b4514fd34 ]

Now while we create new ctrl failed, we have not free the
tagset occupied by admin_q, here try to fix it.

Fixes: fd1418de10 ("nvme-tcp: avoid open-coding nvme_tcp_teardown_admin_queue()")
Signed-off-by: Chunguang.xu <chunguang.xu@shopee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
CVE-2024-56632
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
Chunguang.xu
2025-03-12 22:51:00 +09:00
committed by Stefan Bader
parent 8c30badc68
commit 039f2264fb
+1 -1
View File
@@ -2270,7 +2270,7 @@ destroy_io:
}
destroy_admin:
nvme_stop_keep_alive(ctrl);
nvme_tcp_teardown_admin_queue(ctrl, false);
nvme_tcp_teardown_admin_queue(ctrl, new);
return ret;
}