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]
Date:   Mon, 6 Jun 2022 13:22:26 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Alexander Lobakin <alexandr.lobakin@...el.com>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        patches@...ts.linux.dev, Dan Carpenter <dan.carpenter@...cle.com>,
        kernel test robot <lkp@...el.com>, Tom Rix <trix@...hat.com>,
        Ricky WU <ricky_wu@...ltek.com>
Subject: Re: [PATCH] misc: rtsx: Fix clang -Wsometimes-uninitialized in
 rts5261_init_from_hw()

On Mon, Jun 06, 2022 at 12:58:19PM +0200, Alexander Lobakin wrote:
> From: Nathan Chancellor <nathan@...nel.org>
> Date: Mon, 23 May 2022 08:05:22 -0700
> 
> > Clang warns:
> > 
> >   drivers/misc/cardreader/rts5261.c:406:13: error: variable 'setting_reg2' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
> >           } else if (efuse_valid == 0) {
> >                      ^~~~~~~~~~~~~~~~
> >   drivers/misc/cardreader/rts5261.c:412:30: note: uninitialized use occurs here
> >           pci_read_config_dword(pdev, setting_reg2, &lval2);
> >                                       ^~~~~~~~~~~~
> > 
> > efuse_valid == 1 is not a valid value so just return early from the
> > function to avoid using setting_reg2 uninitialized.
> > 
> > Fixes: b1c5f3085149 ("misc: rtsx: add rts5261 efuse function")
> > Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> > Reported-by: kernel test robot <lkp@...el.com>
> > Reported-by: Tom Rix <trix@...hat.com>
> > Suggested-by: Ricky WU <ricky_wu@...ltek.com>
> > Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> 
> Ping? Mainline 5.19-rc1 is now broken due to this.

Perhaps use a different compiler?  :)

It's in my "to apply" queue, will get there hopefully this week, it came
in during the merge window which prevented me from touching it.  You
know this...

thanks,

greg k-h

Powered by blists - more mailing lists