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] [day] [month] [year] [list]
Date:   Sun, 19 Feb 2023 09:08:39 +0200
From:   Roi Dayan <roid@...dia.com>
To:     Yang Yingliang <yangyingliang@...wei.com>,
        linux-rdma@...r.kernel.org, netdev@...r.kernel.org
Cc:     saeedm@...dia.com, leon@...nel.org, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        ozsh@...dia.com, liwei391@...wei.com
Subject: Re: [PATCH net-next] net/mlx5e: TC, fix return value check in
 mlx5e_tc_act_stats_create()



On 17/02/2023 5:13, Yang Yingliang wrote:
> kvzalloc() returns NULL pointer not PTR_ERR() when it fails,
> so replace the IS_ERR() check with NULL pointer check.
> 
> Fixes: d13674b1d14c ("net/mlx5e: TC, map tc action cookie to a hw counter")
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c
> index f71766dca660..626cb7470fa5 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c
> @@ -37,7 +37,7 @@ mlx5e_tc_act_stats_create(void)
>  	int err;
>  
>  	handle = kvzalloc(sizeof(*handle), GFP_KERNEL);
> -	if (IS_ERR(handle))
> +	if (!handle)
>  		return ERR_PTR(-ENOMEM);
>  
>  	err = rhashtable_init(&handle->ht, &act_counters_ht_params);

thanks

Reviewed-by: Roi Dayan <roid@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ