[PATCH 5/5] nvme-tcp: fix the memleak while create new ctrl failed
brookxu.cn
brookxu.cn at gmail.com
Sat Nov 23 05:37:41 PST 2024
From: "Chunguang.xu" <chunguang.xu at shopee.com>
Now while we create new ctrl failed, we have not free the
tagset occupied by admin_q, here try to fix it.
Signed-off-by: Chunguang.xu <chunguang.xu at shopee.com>
---
drivers/nvme/host/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 57f0f0290cc8..36c7e49af38a 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -2267,7 +2267,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
}
destroy_admin:
nvme_stop_keep_alive(ctrl);
- nvme_tcp_teardown_admin_queue(ctrl, false);
+ nvme_tcp_teardown_admin_queue(ctrl, new);
return ret;
}
--
2.25.1
More information about the Linux-nvme
mailing list