From: Leon Romanovsky <leon@kernel.org>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>
Cc: kjlu@umn.edu, Saeed Mahameed <saeedm@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Or Gerlitz <ogerlitz@mellanox.com>,
Gal Pressman <galp@mellanox.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 two double free cases
Date: Mon, 28 Dec 2020 13:15:32 +0200 [thread overview]
Message-ID: <20201228111532.GJ4457@unreal> (raw)
In-Reply-To: <20201228084840.5013-1-dinghao.liu@zju.edu.cn>
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 occurs
> in mlx5e_create_ttc_table_groups(). Set ft->g to NULL after
> kfree() to avoid double free.
>
> Fixes: 7b3722fa9ef64 ("net/mlx5e: Support RSS for GRE tunneled packets")
> Fixes: 33cfaaa8f36ff ("net/mlx5e: Split the main flow steering table")
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
>
> Changelog:
>
> v2: - Set ft->g to NULL after kfree() instead of removing kfree().
> Refine commit message.
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2020-12-28 11:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 8:48 [PATCH] [v2] net/mlx5e: Fix two double free cases Dinghao Liu
2020-12-28 11:15 ` Leon Romanovsky [this message]
2021-01-05 21:02 ` Saeed Mahameed
2021-01-05 22:58 ` Saeed Mahameed
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=20201228111532.GJ4457@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=dinghao.liu@zju.edu.cn \
--cc=galp@mellanox.com \
--cc=kjlu@umn.edu \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.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;
as well as URLs for NNTP newsgroup(s).