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]
Message-ID: <CAK8P3a0k9S-t1CvpcabNVJOFMWoieuSn6EEr4oB72+T=zQT=aw@mail.gmail.com>
Date:   Tue, 28 Mar 2017 13:35:40 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Ming Lei <tom.leiming@...il.com>
Cc:     Shaohua Li <shli@...nel.org>, NeilBrown <neilb@...e.com>,
        Jens Axboe <axboe@...com>, "colyli@...e.de" <colyli@...e.de>,
        Guoqing Jiang <gqjiang@...e.com>,
        Mike Christie <mchristi@...hat.com>,
        "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" 
        <linux-raid@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()"

On Tue, Mar 28, 2017 at 12:44 PM, Ming Lei <tom.leiming@...il.com> wrote:
> On Tue, Mar 28, 2017 at 5:49 PM, Arnd Bergmann <arnd@...db.de> wrote:
>> Commit 60928a91b0b3 ("md: raid1: use bio helper in process_checks()")
>> is probably correct, but I get a new compile-time warning after
>> it, and have trouble understanding what it fixes:
>>
>> drivers/md/raid1.c: In function 'sync_request_write':
>> drivers/md/raid1.c:2172:9: error: 'page_len$' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>>      if (memcmp(page_address(ppages[j]),
>>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>          page_address(spages[j]),
>>          ~~~~~~~~~~~~~~~~~~~~~~~~
>>          page_len[j]))
>>          ~~~~~~~~~~~~
>> drivers/md/raid1.c:2160:7: note: 'page_len$' was declared here
>>    int page_len[RESYNC_PAGES];
>>        ^~~~~~~~
>>
>> This reverts it to resolve the warning.
>
> Please try the following patch:
>
>  https://lkml.org/lkml/2017/3/28/126


That patch will certainly shut up the warning, but will also prevent
the compiler from warning when the function gets changed in some
way that actually leads to an uninitialized use of the page_len array,
which is why I didn't suggest doing it that way.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ