[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240117091922.GK588419@kernel.org>
Date: Wed, 17 Jan 2024 09:19:22 +0000
From: Simon Horman <horms@...nel.org>
To: Zhipeng Lu <alexious@....edu.cn>
Cc: Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Maor Gottlieb <maorg@...lanox.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v4] net/mlx5e: fix a double-free in arfs_create_groups
On Wed, Jan 17, 2024 at 03:17:36PM +0800, Zhipeng Lu wrote:
> When `in` allocated by kvzalloc fails, arfs_create_groups will free
> ft->g and return an error. However, arfs_create_table, the only caller of
> arfs_create_groups, will hold this error and call to
> mlx5e_destroy_flow_table, in which the ft->g will be freed again.
>
> Fixes: 1cabe6b0965e ("net/mlx5e: Create aRFS flow tables")
> Signed-off-by: Zhipeng Lu <alexious@....edu.cn>
> ---
> Changelog:
>
> v2: free ft->g just in arfs_create_groups with a unwind ladder.
> v3: split the allocation of ft->g and in. Rename the error label.
> remove some refector change in v2.
> v4: correct some space issue.
Thanks for the updates.
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists