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:	Tue, 23 Feb 2016 12:40:55 +0100
From:	David Sterba <dsterba@...e.cz>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>,
	linux-arm-kernel@...ts.infradead.org, linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: avoid uninitialized variable warning

On Mon, Feb 22, 2016 at 10:53:20PM +0100, Arnd Bergmann wrote:
> With CONFIG_SMP and CONFIG_PREEMPT both disabled, gcc decides
> to partially inline the get_state_failrec() function but cannot
> figure out that means the failrec pointer is always valid
> if the function returns success, which causes a harmless
> warning:
> 
> fs/btrfs/extent_io.c: In function 'clean_io_failure':
> fs/btrfs/extent_io.c:2131:4: error: 'failrec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This marks get_state_failrec() and set_state_failrec() both
> as 'noinline', which avoids the warning in all cases for me,
> and seems less ugly than adding a fake initialization.

Thanks for the analysis and the fix, works for me.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ