[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <79a35d07.7894.176a756c881.Coremail.dinghao.liu@zju.edu.cn>
Date: Mon, 28 Dec 2020 11:14:11 +0800 (GMT+08:00)
From: dinghao.liu@....edu.cn
To: "Leon Romanovsky" <leon@...nel.org>
Cc: kjlu@....edu, "Saeed Mahameed" <saeedm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
"Jakub Kicinski" <kuba@...nel.org>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH] net/mlx5e: Fix two double free cases
> On Mon, Dec 21, 2020 at 04:50:31PM +0800, Dinghao Liu wrote:
> > mlx5e_create_ttc_table_groups() frees ft->g on failure of
> > kvzalloc(), but such failure will be caught by its caller
> > in mlx5e_create_ttc_table() and ft->g will be freed again
> > in mlx5e_destroy_flow_table(). The same issue also occurs
> > in mlx5e_create_ttc_table_groups().
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> > ---
> > drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
>
> I'm not thrilled to see release in the error flow that will be done in
> the different function. The missing piece is "ft->g = NULL" after kfree().
>
> And also fixes lines are missing in all your patches.
>
Thank you for your advice! I will resend a new patch soon.
Regards,
Dinghao
Powered by blists - more mailing lists