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: <0a6b1f5f-e470-a747-e45d-56648860d510@nvidia.com>
Date:   Wed, 31 Aug 2022 08:40:28 +0300
From:   Roi Dayan <roid@...dia.com>
To:     netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Saeed Mahameed <saeedm@...dia.com>,
        Maor Dickman <maord@...dia.com>, alexandr.lobakin@...el.com,
        dan.carpenter@...cle.com
Subject: Re: [PATCH net-next 1/1] net/mlx5e: Fix returning uninitialized err



On 2022-08-30 3:20 PM, Roi Dayan wrote:
> In the cited commit the function mlx5e_rep_add_meta_tunnel_rule()
> was added and in success flow, err was returned uninitialized.
> Fix it.
> 
> Fixes: 430e2d5e2a98 ("net/mlx5: E-Switch, Move send to vport meta rule creation")
> Reported-by: Alexander Lobakin <alexandr.lobakin@...el.com>
> Signed-off-by: Roi Dayan <roid@...dia.com>
> Reviewed-by: Maor Dickman <maord@...dia.com>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 +++-------
>   1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> index 914bddbfc1d7..e09bca78df75 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> @@ -471,22 +471,18 @@ mlx5e_rep_add_meta_tunnel_rule(struct mlx5e_priv *priv)
>   	struct mlx5_eswitch_rep *rep = rpriv->rep;
>   	struct mlx5_flow_handle *flow_rule;
>   	struct mlx5_flow_group *g;
> -	int err;
>   
>   	g = esw->fdb_table.offloads.send_to_vport_meta_grp;
>   	if (!g)
>   		return 0;
>   
>   	flow_rule = mlx5_eswitch_add_send_to_vport_meta_rule(esw, rep->vport);
> -	if (IS_ERR(flow_rule)) {
> -		err = PTR_ERR(flow_rule);
> -		goto out;
> -	}
> +	if (IS_ERR(flow_rule))
> +		return PTR_ERR(flow_rule);
>   
>   	rpriv->send_to_vport_meta_rule = flow_rule;
>   
> -out:
> -	return err;
> +	return 0;
>   }
>   
>   static void

just noticed same patch from Nathan Chancellor.
so can ignore this one.

[PATCH net-next] net/mlx5e: Do not use err uninitialized in 
mlx5e_rep_add_meta_tunnel_rule()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ