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:   Wed, 01 Jun 2022 21:57:28 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     Chris Mason <chris.mason@...ionio.com>,
        Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>,
        Ira Weiny <ira.weiny@...el.com>, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel test robot <lkp@...el.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org
Subject: Re: [PATCH 3/3] btrfs: Replace kmap() with kmap_local_page() in zlib.c

On martedì 31 maggio 2022 22:35:30 CEST kernel test robot wrote:
> Hi "Fabio,
> 
> Thank you for the patch! Perhaps something to improve:
> 

[snip]

> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@...el.com>
> 
> All warnings (new ones prefixed by >>):
> 
> >> fs/btrfs/zlib.c:125:6: warning: variable 'data_in' is used 
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
>            if (out_page == NULL) {
>                ^~~~~~~~~~~~~~~~
>    fs/btrfs/zlib.c:270:6: note: uninitialized use occurs here
>            if (data_in) {
>                ^~~~~~~
>    fs/btrfs/zlib.c:125:2: note: remove the 'if' if its condition is 
always false
>            if (out_page == NULL) {
>            ^~~~~~~~~~~~~~~~~~~~~~~
>    fs/btrfs/zlib.c:115:6: warning: variable 'data_in' is used 
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
>            if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>                
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/zlib.h:148:25: note: expanded from macro 'Z_OK'
>    #define Z_OK            0
>                            ^
>    fs/btrfs/zlib.c:270:6: note: uninitialized use occurs here
>            if (data_in) {
>                ^~~~~~~
>    fs/btrfs/zlib.c:115:2: note: remove the 'if' if its condition is 
always false
>            if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>            
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    fs/btrfs/zlib.c:100:15: note: initialize the variable 'data_in' to 
silence this warning
>            char *data_in;
>                         ^
>                          = NULL
> >> fs/btrfs/zlib.c:125:6: warning: variable 'cpage_out' is used 
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
>            if (out_page == NULL) {
>                ^~~~~~~~~~~~~~~~
>    fs/btrfs/zlib.c:267:6: note: uninitialized use occurs here
>            if (cpage_out)
>                ^~~~~~~~~
>    fs/btrfs/zlib.c:125:2: note: remove the 'if' if its condition is 
always false
>            if (out_page == NULL) {
>            ^~~~~~~~~~~~~~~~~~~~~~~
>    fs/btrfs/zlib.c:115:6: warning: variable 'cpage_out' is used 
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
>            if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>                
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/zlib.h:148:25: note: expanded from macro 'Z_OK'
>    #define Z_OK            0
>                            ^
>    fs/btrfs/zlib.c:267:6: note: uninitialized use occurs here
>            if (cpage_out)
>                ^~~~~~~~~
>    fs/btrfs/zlib.c:115:2: note: remove the 'if' if its condition is 
always false
>            if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>            
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    fs/btrfs/zlib.c:101:17: note: initialize the variable 'cpage_out' to 
silence this warning
>            char *cpage_out;
>                           ^
>                            = NULL
>    4 warnings generated.

I'll initialize these variables in v2.

Thanks,

Fabio


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ