Skip to content

Commit 039f226

Browse files
Chunguang.xusmb49
authored andcommitted
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: fd1418d ("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>
1 parent 8c30bad commit 039f226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
22702270
}
22712271
destroy_admin:
22722272
nvme_stop_keep_alive(ctrl);
2273-
nvme_tcp_teardown_admin_queue(ctrl, false);
2273+
nvme_tcp_teardown_admin_queue(ctrl, new);
22742274
return ret;
22752275
}
22762276

0 commit comments

Comments
 (0)