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]
Message-ID: <20190617123202.GD19057@suse.cz>
Date:   Mon, 17 Jun 2019 14:32:02 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        Anand Jain <anand.jain@...cle.com>,
        Filipe Manana <FdManana@...e.com>,
        Nikolay Borisov <nborisov@...e.com>,
        linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: shut up bogus -Wmaybe-uninitialized warning

On Mon, Jun 17, 2019 at 01:07:28PM +0200, Arnd Bergmann wrote:
> gcc sometimes can't determine whether a variable has been initialized
> when both the initialization and the use are conditional:
> 
> fs/btrfs/props.c: In function 'inherit_props':
> fs/btrfs/props.c:389:4: error: 'num_bytes' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>     btrfs_block_rsv_release(fs_info, trans->block_rsv,
> 
> This code is fine. Unfortunately, I cannot think of a good way to
> rephrase it in a way that makes gcc understand this, so I add
> a bogus initialization the way one should not.

Looks ok, patch added to devel queue, thanks.
> 
> Fixes: d7400ee1b476 ("btrfs: use the existing reserved items for our first prop for inheritance")

I'd rather not add the Fixes tag here as it's just a compilation warning
for some old unknown version of gcc. I've checked that 8.3.1 and 9.1.1
don't print the warning and I consider any other version to be up to the
user of such environment to apply fixups as needed, but not to let the
stable machinery pick it up.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ