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]
Message-ID: <d8cf5bd620e65351dbd82d18b0426a22ea77eae2.camel@gmail.com>
Date:   Thu, 23 Dec 2021 11:34:55 -0800
From:   Saeed Mahameed <saeed.kernel@...il.com>
To:     Qing Wang <wangqing@...o.com>, Saeed Mahameed <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: mellanox: return errno instead of 1

On Wed, 2021-12-22 at 18:24 -0800, Qing Wang wrote:
> From: Wang Qing <wangqing@...o.com>
> 
> mlx5e_hv_vhca_stats_create() better return specific error than 1
> 
> Signed-off-by: Wang Qing <wangqing@...o.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> index d290d72..04cda3d
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> @@ -142,7 +142,7 @@ int mlx5e_hv_vhca_stats_create(struct mlx5e_priv
> *priv)
>                                     PTR_ERR(agent));
>  
>                 kvfree(priv->stats_agent.buf);
> -               return IS_ERR_OR_NULL(agent);
> +               return agent ? PTR_ERR(agent) : -ENODEV;

the single caller of this function ignores the return value,
I just made a patch to void the return value and added you as Reported-
by.

Thanks !


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ