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: <8bd30131-c9f2-4075-a575-7fa2793a1760@moroto.mountain>
Date:   Tue, 24 Oct 2023 12:50:59 +0300
From:   Dan Carpenter <dan.carpenter@...aro.org>
To:     Przemek Kitszel <przemyslaw.kitszel@...el.com>
Cc:     Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Shannon Nelson <shannon.nelson@....com>,
        Michael Chan <michael.chan@...adcom.com>,
        Cai Huoqing <cai.huoqing@...ux.dev>,
        George Cherian <george.cherian@...vell.com>,
        Danielle Ratson <danieller@...dia.com>,
        Moshe Shemesh <moshe@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Ariel Elior <aelior@...vell.com>,
        Manish Chopra <manishc@...vell.com>,
        Igor Russkikh <irusskikh@...vell.com>,
        Coiby Xu <coiby.xu@...il.com>, Simon Horman <horms@...nel.org>,
        Brett Creeley <brett.creeley@....com>,
        Sunil Goutham <sgoutham@...vell.com>,
        Linu Cherian <lcherian@...vell.com>,
        Geetha sowjanya <gakula@...vell.com>,
        Jerin Jacob <jerinj@...vell.com>,
        hariprasad <hkelam@...vell.com>,
        Subbaraya Sundeep <sbhatta@...vell.com>,
        Ido Schimmel <idosch@...dia.com>,
        Petr Machata <petrm@...dia.com>,
        Eran Ben Elisha <eranbe@...dia.com>,
        Aya Levin <ayal@...lanox.com>,
        Leon Romanovsky <leon@...nel.org>,
        linux-kernel@...r.kernel.org, Benjamin Poirier <bpoirier@...e.com>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>,
        Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next v3 08/11] net/mlx5: devlink health: use retained
 error fmsg API

On Wed, Oct 18, 2023 at 10:26:44PM +0200, Przemek Kitszel wrote:
>  	if (rq->icosq) {
>  		struct mlx5e_icosq *icosq = rq->icosq;
>  		u8 icosq_hw_state;
>  
> -		err = mlx5_core_query_sq_state(rq->mdev, icosq->sqn, &icosq_hw_state);
> -		if (err)
> -			return err;
> -
> -		err = mlx5e_reporter_icosq_diagnose(icosq, icosq_hw_state, fmsg);
> -		if (err)
> -			return err;
> +		mlx5_core_query_sq_state(rq->mdev, icosq->sqn, &icosq_hw_state);

When we remove the error checking then Smatch correctly complains that
icosq_hw_state is used uninitialized.

    drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:268 mlx5e_rx_reporter_build_diagnose_output_rq_common()
    error: uninitialized symbol 'icosq_hw_state'.

> +		mlx5e_reporter_icosq_diagnose(icosq, icosq_hw_state, fmsg);
>  	}
>  
>  	return 0;
>  }

See also:
    drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c:229 mlx5e_tx_reporter_build_diagnose_output_sq_common()
    error: uninitialized symbol 'state'.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ