lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <febe8f20-626a-02d6-c8ed-f0dcf6cd607f@gmail.com>
Date:   Tue, 8 Nov 2022 19:58:33 +0200
From:   Tariq Toukan <ttoukan.linux@...il.com>
To:     YueHaibing <yuehaibing@...wei.com>, borisp@...dia.com,
        saeedm@...dia.com, leon@...nel.org, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        lkayal@...dia.com, tariqt@...dia.com, markzhang@...dia.com
Cc:     netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net/mlx5e: Use kvfree() in mlx5e_accel_fs_tcp_create()



On 11/8/2022 4:06 PM, YueHaibing wrote:
> 'accel_tcp' is allocted by kvzalloc(), which should freed by kvfree().
> 
> Fixes: f52f2faee581 ("net/mlx5e: Introduce flow steering API")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
> v2: fix the same issue in mlx5e_accel_fs_tcp_destroy() and a commit log typo
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
> index 285d32d2fd08..d7c020f72401 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
> @@ -365,7 +365,7 @@ void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs)
>   	for (i = 0; i < ACCEL_FS_TCP_NUM_TYPES; i++)
>   		accel_fs_tcp_destroy_table(fs, i);
>   
> -	kfree(accel_tcp);
> +	kvfree(accel_tcp);
>   	mlx5e_fs_set_accel_tcp(fs, NULL);
>   }
>   
> @@ -397,7 +397,7 @@ int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs)
>   err_destroy_tables:
>   	while (--i >= 0)
>   		accel_fs_tcp_destroy_table(fs, i);
> -	kfree(accel_tcp);
> +	kvfree(accel_tcp);
>   	mlx5e_fs_set_accel_tcp(fs, NULL);
>   	return err;
>   }

Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Thanks for your patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ