Skip to content

Commit

Permalink
nvmet-tcp: fix nvme tcp ida memory leak
Browse files Browse the repository at this point in the history
[ Upstream commit 47c5dd6 ]

The nvmet_tcp_queue_ida should be destroy when the nvmet-tcp module
exit.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
guixinliu1995 authored and gregkh committed Mar 1, 2024
1 parent 83527a1 commit 307fc03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nvme/target/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1927,6 +1927,7 @@ static void __exit nvmet_tcp_exit(void)
flush_workqueue(nvmet_wq);

destroy_workqueue(nvmet_tcp_wq);
ida_destroy(&nvmet_tcp_queue_ida);
}

module_init(nvmet_tcp_init);
Expand Down

0 comments on commit 307fc03

Please sign in to comment.