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>] [day] [month] [year] [list]
Message-ID: <202108200515.vb8omh9V-lkp@intel.com>
Date:   Fri, 20 Aug 2021 05:12:21 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [dhowells-fs:netfs-folio-regions 24/28] fs/netfs/write_back.c:370:3:
 warning: misleading indentation; statement is not part of the previous 'if'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-folio-regions
head:   215a4ee495a95cc73256ed76f91cb78bcabd6b8e
commit: aa9c4d14149db8497a57098e64074fb6857fd952 [24/28] netfs: Process pending write queue
config: hexagon-randconfig-r041-20210818 (attached as .config)
compiler: clang version 12.0.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=aa9c4d14149db8497a57098e64074fb6857fd952
        git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
        git fetch --no-tags dhowells-fs netfs-folio-regions
        git checkout aa9c4d14149db8497a57098e64074fb6857fd952
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   fs/netfs/write_back.c:114:6: warning: variable 'region' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (range.start < wreq->coverage.start) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/netfs/write_back.c:129:18: note: uninitialized use occurs here
           if (range.end > region->dirty.end) {
                           ^~~~~~
   fs/netfs/write_back.c:114:2: note: remove the 'if' if its condition is always true
           if (range.start < wreq->coverage.start) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/netfs/write_back.c:98:35: note: initialize the variable 'region' to silence this warning
           struct netfs_dirty_region *region, *r;
                                            ^
                                             = NULL
>> fs/netfs/write_back.c:370:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
                   ctx->ops->create_write_operations(wreq);
                   ^
   fs/netfs/write_back.c:367:2: note: previous statement is here
           if (test_bit(NETFS_WREQ_WRITE_TO_CACHE, &wreq->flags))
           ^
   fs/netfs/write_back.c:420:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
                   if (!folio_trylock(folio))
                       ^~~~~~~~~~~~~~~~~~~~~
   fs/netfs/write_back.c:424:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   fs/netfs/write_back.c:420:3: note: remove the 'if' if its condition is always true
                   if (!folio_trylock(folio))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/netfs/write_back.c:407:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   fs/netfs/write_back.c:478:20: warning: variable 'region' is uninitialized when used here [-Wuninitialized]
           if (range.start < region->dirty.start) {
                             ^~~~~~
   fs/netfs/write_back.c:463:35: note: initialize the variable 'region' to silence this warning
           struct netfs_dirty_region *region, *r;
                                            ^
                                             = NULL
   fs/netfs/write_back.c:1089:1: error: expected statement
   }
   ^
   4 warnings and 1 error generated.


vim +/if +370 fs/netfs/write_back.c

   346	
   347	/*
   348	 * Process a write request.
   349	 *
   350	 * All the folios in the bounding box have had a ref taken on them and those
   351	 * covering the dirty region have been marked as being written back and their
   352	 * dirty bits provisionally cleared.
   353	 */
   354	static void netfs_writeback(struct netfs_write_request *wreq)
   355	{
   356		struct netfs_i_context *ctx = netfs_i_context(wreq->inode);
   357	
   358		kenter("");
   359	
   360		if (test_bit(NETFS_ICTX_ENCRYPTED, &ctx->flags) &&
   361		    !netfs_prepare_wreq(wreq))
   362			goto out;
   363	
   364		/* ->outstanding > 0 carries a ref */
   365		netfs_get_write_request(wreq, netfs_wreq_trace_get_for_outstanding);
   366	
   367		if (test_bit(NETFS_WREQ_WRITE_TO_CACHE, &wreq->flags))
   368			netfs_set_up_write_to_cache(wreq);
   369		//if (wreq->region->type != NETFS_REGION_CACHE_COPY)
 > 370			ctx->ops->create_write_operations(wreq);
   371	out:
   372		if (atomic_dec_and_test(&wreq->outstanding))
   373			netfs_write_completed(wreq, false);
   374	}
   375	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (26608 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ