[PATCH] nvmet-tcp: fix memory leak when having inflight commands on disconnect
Christoph Hellwig
hch at infradead.org
Wed May 26 07:05:11 PDT 2021
On Mon, May 24, 2021 at 02:24:41PM +0300, elad.grupi at dell.com wrote:
> }
>
> +static void nvmet_tcp_free_resp_list(struct nvmet_tcp_queue *queue)
> +{
> + struct list_head *p;
> + struct nvmet_tcp_cmd *cmd;
> + int c = 0;
> +
> + nvmet_tcp_process_resp_list(queue);
> +
> + list_for_each(p, &queue->resp_send_list) {
> + cmd = list_entry(p, struct nvmet_tcp_cmd, entry);
Please use list_for_each_entry instead.
More information about the Linux-nvme
mailing list