Re: [PATCH] [v2] net/mlx5e: Fix two double free cases

2021-01-05 Thread Saeed Mahameed
On Tue, 2021-01-05 at 13:02 -0800, Saeed Mahameed wrote: > On Mon, 2020-12-28 at 16:48 +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

Re: [PATCH] [v2] net/mlx5e: Fix two double free cases

2021-01-05 Thread Saeed Mahameed
On Mon, 2020-12-28 at 16:48 +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

Re: [PATCH] [v2] net/mlx5e: Fix two double free cases

2020-12-28 Thread Leon Romanovsky
On Mon, Dec 28, 2020 at 04:48:40PM +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

[PATCH] [v2] net/mlx5e: Fix two double free cases

2020-12-28 Thread Dinghao Liu
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(). Set ft->g to NULL after