[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7697529c-b545-42b7-d793-fca51d2d666e@intel.com>
Date: Mon, 28 Nov 2022 15:37:59 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Saeed Mahameed <saeed@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>
CC: Saeed Mahameed <saeedm@...dia.com>, <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...dia.com>,
Emeel Hakim <ehakim@...dia.com>, Raed Salem <raeds@...dia.com>
Subject: Re: [net 12/15] net/mlx5e: MACsec, fix add Rx security association
(SA) rule memory leak
On 11/24/2022 12:10 AM, Saeed Mahameed wrote:
> From: Emeel Hakim <ehakim@...dia.com>
>
> Currently MACsec's add Rx SA flow steering (fs) rule routine
> uses a spec object which is dynamically allocated and do
> not free it upon leaving. The above led to a memory leak.
>
> Fix by freeing dynamically allocated objects.
>
> Fixes: 3b20949cb21b ("net/mlx5e: Add MACsec RX steering rules")
> Signed-off-by: Emeel Hakim <ehakim@...dia.com>
> Reviewed-by: Raed Salem <raeds@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c
> index f87a1c4021bc..5b658a5588c6 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c
> @@ -1209,6 +1209,7 @@ macsec_fs_rx_add_rule(struct mlx5e_macsec_fs *macsec_fs,
> rx_rule->rule[1] = rule;
> }
>
> + kvfree(spec);
> return macsec_rule;
>
> err:
Powered by blists - more mailing lists