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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160722001140.GA9305@gwshan>
Date:	Fri, 22 Jul 2016 10:11:40 +1000
From:	Gavin Shan <gwshan@...ux.vnet.ibm.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Gavin Shan <gwshan@...ux.vnet.ibm.com>,
	Joel Stanley <joel@....id.au>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net/ncsi: avoid maybe-uninitialized warning

On Thu, Jul 21, 2016 at 09:28:34PM +0200, Arnd Bergmann wrote:
>gcc-4.9 and higher warn about the newly added NSCI code:
>
>net/ncsi/ncsi-manage.c: In function 'ncsi_process_next_channel':
>net/ncsi/ncsi-manage.c:1003:2: error: 'old_state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
>The warning is a false positive and therefore harmless, but it would be good to
>avoid it anyway. I have determined that the barrier in the spin_unlock_irqsave()
>is what confuses gcc to the point that it cannot track whether the variable
>was unused or not.
>
>This rearranges the code in a way that makes it obvious to gcc that old_state
>is always initialized at the time of use, functionally this should not
>change anything.
>
>Signed-off-by: Arnd Bergmann <arnd@...db.de>

Acked-by: Gavin Shan <gwshan@...ux.vnet.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ