From: alexious@zju.edu.cn
To: "Simon Horman" <horms@kernel.org>
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] [v2] net/mlx5e: fix a double-free in arfs_create_groups
Date: Fri, 12 Jan 2024 15:45:29 +0800 (GMT+08:00) [thread overview]
Message-ID: <74def06a.828f1.18cfca212e2.Coremail.alexious@zju.edu.cn> (raw)
In-Reply-To: <20240110162446.GJ9296@kernel.org>
> On Wed, Jan 10, 2024 at 09:23:24PM +0800, alexious@zju.edu.cn wrote:
> > > On Mon, Jan 08, 2024 at 11:26:04PM +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>
> > > > Reviewed-by: Simon Horman <horms@kernel.org>
> > >
> > > When working on netdev (and probably elsewhere)
> > > Please don't include Reviewed-by or other tags
> > > that were explicitly supplied by someone: I don't recall
> > > supplying the tag above so please drop it.
> >
> > I apologize, but it appears that you included a "reviewed-by"
> > tag along with certain suggestions for version 1 of this patch
> > in the first review email(about 6 days before).
>
> Yes, sorry. My statement above is not correct:
> I now see that I did supply the tag.
Never mind, you did give a lot of constructive suggestion proberly to every patch.
Forgetting about a tag, well, it can't be helped.
> > In response, after a short discussion, I followed some of
> > those suggestions and send this v2 patch.
> > I referred to the "Dealing with tags" section in this KernelNewbies
> > tips: https://kernelnewbies.org/PatchTipsAndTricks and thought
> > that I should include that tag in v1 email to this v2 patch.
> > So now I'm a little bit confused here: if the tag rule has changed
> > or I got some misunderstanding on existing rules? Your clarification
> > on this matter would be greatly appreciated.
>
...
>
> Right, I think it would be best to focus on fixing arfs_create_groups().
> And making sure that neither leaks nor double frees occur. And I think
> that at this point that includes ensuring ft->g is NULL if it has been freed.
A v3 version of this patch was sent just now, which is focusing on arfs_create_groups itself.
Have a nice day!
prev parent reply other threads:[~2024-01-12 7:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 15:26 [PATCH] [v2] net/mlx5e: fix a double-free in arfs_create_groups Zhipeng Lu
2024-01-09 8:18 ` Simon Horman
2024-01-10 13:23 ` alexious
2024-01-10 16:24 ` Simon Horman
2024-01-12 7:45 ` alexious [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=74def06a.828f1.18cfca212e2.Coremail.alexious@zju.edu.cn \
--to=alexious@zju.edu.cn \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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