[PATCH] nvmet-tcp: fix memory leak when having inflight commands on disconnect

Grupi, Elad Elad.Grupi at dell.com
Thu May 27 00:38:26 PDT 2021


Sure. I will prepare an update to the patch today.

Thanks,
Elad

-----Original Message-----
From: Christoph Hellwig <hch at infradead.org> 
Sent: Wednesday, 26 May 2021 17:05
To: Grupi, Elad
Cc: sagi at grimberg.me; linux-nvme at lists.infradead.org
Subject: Re: [PATCH] nvmet-tcp: fix memory leak when having inflight commands on disconnect


[EXTERNAL EMAIL] 

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