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  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:   Mon, 14 Sep 2020 07:26:02 +0200
From:   Arend Van Spriel <arend.vanspriel@...adcom.com>
To:     <trix@...hat.com>, <franky.lin@...adcom.com>,
        <hante.meuleman@...adcom.com>, <chi-hsien.lin@...ress.com>,
        <wright.feng@...ress.com>, <kvalo@...eaurora.org>,
        <davem@...emloft.net>, <kuba@...nel.org>,
        <natechancellor@...il.com>, <ndesaulniers@...gle.com>,
        <smoch@....de>, <dan.carpenter@...cle.com>,
        <double.lo@...ress.com>, <digetx@...il.com>,
        <frank.kao@...ress.com>, <amsr@...ress.com>,
        <stanley.hsu@...ress.com>, <saravanan.shanmugham@...ress.com>,
        <jean-philippe@...aro.org>, <linville@...driver.com>
CC:     <linux-wireless@...r.kernel.org>,
        <brcm80211-dev-list.pdl@...adcom.com>,
        <brcm80211-dev-list@...ress.com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] brcmfmac: initialize variable

On September 13, 2020 4:35:44 PM trix@...hat.com wrote:

> From: Tom Rix <trix@...hat.com>
>
> clang static analysis flags this problem
> sdio.c:3265:13: warning: Branch condition evaluates to
>  a garbage value
>        } else if (pending) {
>                   ^~~~~~~
>
> brcmf_sdio_dcmd_resp_wait() only sets pending to true.
> So pending needs to be initialized to false.

True. However, I prefer to fix it in brcmf_sdio_dcmd_resp_wait() and say:

*pending = signal_pending(current);

Regards,
Arend

> Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers")
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)




Download attachment "smime.p7s" of type "application/pkcs7-signature" (4176 bytes)

Powered by blists - more mailing lists