Skip to content

Commit

Permalink
nvme-tcp: fix the memleak while create new ctrl failed
Browse files Browse the repository at this point in the history
[ 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]>
  • Loading branch information
Chunguang.xu authored and gregkh committed Dec 14, 2024
1 parent 845cc4e commit ceff9ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,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;
}

Expand Down

0 comments on commit ceff9ac

Please sign in to comment.