Skip to content

Commit 6b4105c

Browse files
Chunguang.xumehmetb0
authored andcommitted
nvme-tcp: fix the memleak while create new ctrl failed
BugLink: https://bugs.launchpad.net/bugs/2096827 [ Upstream commit fec55c2 ] 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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Sasha Levin <[email protected]> CVE-2024-56632 Signed-off-by: Koichiro Den <[email protected]>
1 parent 5276b0f commit 6b4105c

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
@@ -2290,7 +2290,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
22902290
}
22912291
destroy_admin:
22922292
nvme_stop_keep_alive(ctrl);
2293-
nvme_tcp_teardown_admin_queue(ctrl, false);
2293+
nvme_tcp_teardown_admin_queue(ctrl, new);
22942294
return ret;
22952295
}
22962296

0 commit comments

Comments
 (0)