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: <ZK2QeBZKWi0Q6vuW@corigine.com>
Date:   Tue, 11 Jul 2023 18:25:12 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Kalle Valo <kvalo@...nel.org>, linux-wireless@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net] wifi: airo: avoid uninitialized warning in
 airo_get_rate()

On Sun, Jul 09, 2023 at 06:31:54AM -0700, Randy Dunlap wrote:
> Quieten a gcc (11.3.0) build error or warning by checking the function
> call status and returning -EBUSY if the function call failed.
> This is similar to what several other wireless drivers do for the
> SIOCGIWRATE ioctl call when there is a locking problem.
> 
> drivers/net/wireless/cisco/airo.c: error: 'status_rid.currentXmitRate' is used uninitialized [-Werror=uninitialized]

Hi Randy,

There seem to be other calls to readStatusRid() in the same file
with similar properties. Perhaps it would be best to fix them too?

> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Link: lore.kernel.org/r/39abf2c7-24a-f167-91da-ed4c5435d1c4@...ux-m68k.org
> Cc: Kalle Valo <kvalo@...nel.org>
> Cc: linux-wireless@...r.kernel.org
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: Paolo Abeni <pabeni@...hat.com>
> Cc: netdev@...r.kernel.org
> ---
>  drivers/net/wireless/cisco/airo.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff -- a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
> --- a/drivers/net/wireless/cisco/airo.c
> +++ b/drivers/net/wireless/cisco/airo.c
> @@ -6157,8 +6157,11 @@ static int airo_get_rate(struct net_devi
>  	struct iw_param *vwrq = &wrqu->bitrate;
>  	struct airo_info *local = dev->ml_priv;
>  	StatusRid status_rid;		/* Card status info */
> +	int ret;
>  
> -	readStatusRid(local, &status_rid, 1);
> +	ret = readStatusRid(local, &status_rid, 1);
> +	if (ret)
> +		return -EBUSY;
>  
>  	vwrq->value = le16_to_cpu(status_rid.currentXmitRate) * 500000;
>  	/* If more than one rate, set auto */
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ