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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Sep 2016 08:43:12 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Omar Sandoval <osandov@...com>, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sbitmap: avoid maybe-uninitialized warning

On 09/19/2016 06:33 AM, Arnd Bergmann wrote:
> The sbitmap code that has just been turned into a library module
> returns uninitialized data for sbitmap_weight(), as pointed out by
> gcc when building with -Wmaybe-uninitialized:
>
> lib/sbitmap.c: In function 'sbitmap_weight':
> lib/sbitmap.c:179:9: error: 'weight' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> Note that the value is never initialized, we just add data on
> top, so it is wrong regardless of sb->map_nr.
>
> This adds the missing initialization.

Thanks Arnd, Colin sent the same patch and I applied it. Note that:

> Fixes: 88459642cba4 ("blk-mq: abstract tag allocation out into sbitmap library")

that isn't truly correct, that patch is just what moved the code. The 
bug predates that commit.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ