From: Simon Horman <horms@kernel•org>
To: Zhipeng Lu <alexious@zju•edu.cn>
Cc: Saeed Mahameed <saeedm@nvidia•com>,
Leon Romanovsky <leon@kernel•org>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
Maor Gottlieb <maorg@mellanox•com>,
netdev@vger•kernel.org, linux-rdma@vger•kernel.org,
linux-kernel@vger•kernel.org
Subject: Re: [PATCH net v4] net/mlx5e: fix a double-free in arfs_create_groups
Date: Wed, 17 Jan 2024 09:19:22 +0000 [thread overview]
Message-ID: <20240117091922.GK588419@kernel.org> (raw)
In-Reply-To: <20240117071736.3813981-1-alexious@zju.edu.cn>
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@zju•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@kernel•org>
prev parent reply other threads:[~2024-01-17 9:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 7:17 [PATCH net v4] net/mlx5e: fix a double-free in arfs_create_groups Zhipeng Lu
2024-01-17 9:19 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240117091922.GK588419@kernel.org \
--to=horms@kernel$(echo .)org \
--cc=alexious@zju$(echo .)edu.cn \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=leon@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=maorg@mellanox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=saeedm@nvidia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox