All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: fs/ocfs2/suballoc.c:2222:21: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
Date: Sun, 29 Aug 2021 04:05:42 +0800	[thread overview]
Message-ID: <202108290434.xbU13spO-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 26756 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Arnd Bergmann <arnd@arndb.de>
CC: Nathan Chancellor <nathan@kernel.org>
CC: Kees Cook <keescook@chromium.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   64b4fc45bea6f4faa843d2f97ff51665280efee1
commit: 97e4910232fa1f81e806aa60c25a0450276d99a2 linux/compiler-clang.h: define HAVE_BUILTIN_BSWAP*
date:   6 months ago
:::::: branch date: 21 hours ago
:::::: commit date: 6 months ago
config: powerpc-randconfig-c003-20210826 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project ea08c4cd1c0869ec5024a8bb3f5cdf06ab03ae83)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=97e4910232fa1f81e806aa60c25a0450276d99a2
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 97e4910232fa1f81e806aa60c25a0450276d99a2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc clang-analyzer 

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


clang-analyzer warnings: (new ones prefixed by >>)
               ^~
   fs/ocfs2/suballoc.c:303:2: note: Taking true branch
           if (rc)
           ^
   fs/ocfs2/suballoc.c:304:3: note: Control jumps to line 317
                   goto out;
                   ^
   fs/ocfs2/suballoc.c:317:2: note: Returning without writing to '*bh'
           return rc;
           ^
   fs/ocfs2/suballoc.c:1758:11: note: Returning from 'ocfs2_read_group_descriptor'
           status = ocfs2_read_group_descriptor(alloc_inode, fe,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:1761:6: note: Assuming 'status' is >= 0
           if (status < 0) {
               ^~~~~~~~~~
   fs/ocfs2/suballoc.c:1761:2: note: Taking false branch
           if (status < 0) {
           ^
   fs/ocfs2/suballoc.c:1765:35: note: Access to field 'b_data' results in a dereference of a null pointer (loaded from variable 'group_bh')
           bg = (struct ocfs2_group_desc *) group_bh->b_data;
                                            ^~~~~~~~
   fs/ocfs2/suballoc.c:1767:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
           status = -ENOSPC;
           ^        ~~~~~~~
   fs/ocfs2/suballoc.c:1767:2: note: Value stored to 'status' is never read
           status = -ENOSPC;
           ^        ~~~~~~~
   fs/ocfs2/suballoc.c:1789:36: warning: Access to field 'b_data' results in a dereference of a null pointer (loaded from variable 'group_bh') [clang-analyzer-core.NullDereference]
                   bg = (struct ocfs2_group_desc *) group_bh->b_data;
                                                    ^~~~~~~~
   fs/ocfs2/suballoc.c:1758:11: note: Calling 'ocfs2_read_group_descriptor'
           status = ocfs2_read_group_descriptor(alloc_inode, fe,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:303:6: note: Assuming 'rc' is 0
           if (rc)
               ^~
   fs/ocfs2/suballoc.c:303:2: note: Taking false branch
           if (rc)
           ^
   fs/ocfs2/suballoc.c:307:6: note: Assuming 'rc' is 0
           if (rc) {
               ^~
   fs/ocfs2/suballoc.c:307:2: note: Taking false branch
           if (rc) {
           ^
   fs/ocfs2/suballoc.c:313:2: note: Taking true branch
           if (!*bh)
           ^
   fs/ocfs2/suballoc.c:1758:11: note: Returning from 'ocfs2_read_group_descriptor'
           status = ocfs2_read_group_descriptor(alloc_inode, fe,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:1761:6: note: 'status' is >= 0
           if (status < 0) {
               ^~~~~~
   fs/ocfs2/suballoc.c:1761:2: note: Taking false branch
           if (status < 0) {
           ^
   fs/ocfs2/suballoc.c:1770:9: note: Assuming the condition is true
           while ((status = ac->ac_group_search(alloc_inode, group_bh,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:1770:2: note: Loop condition is true.  Entering loop body
           while ((status = ac->ac_group_search(alloc_inode, group_bh,
           ^
   fs/ocfs2/suballoc.c:1774:7: note: Assuming field 'bg_next_group' is not equal to 0
                   if (!bg->bg_next_group)
                       ^~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:1774:3: note: Taking false branch
                   if (!bg->bg_next_group)
                   ^
   fs/ocfs2/suballoc.c:1782:3: note: Null pointer value stored to 'group_bh'
                   group_bh = NULL;
                   ^~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:1783:12: note: Calling 'ocfs2_read_group_descriptor'
                   status = ocfs2_read_group_descriptor(alloc_inode, fe,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:303:6: note: Assuming 'rc' is not equal to 0
           if (rc)
               ^~
   fs/ocfs2/suballoc.c:303:2: note: Taking true branch
           if (rc)
           ^
   fs/ocfs2/suballoc.c:304:3: note: Control jumps to line 317
                   goto out;
                   ^
   fs/ocfs2/suballoc.c:317:2: note: Returning without writing to '*bh'
           return rc;
           ^
   fs/ocfs2/suballoc.c:1783:12: note: Returning from 'ocfs2_read_group_descriptor'
                   status = ocfs2_read_group_descriptor(alloc_inode, fe,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:1785:7: note: Assuming 'status' is >= 0
                   if (status < 0) {
                       ^~~~~~~~~~
   fs/ocfs2/suballoc.c:1785:3: note: Taking false branch
                   if (status < 0) {
                   ^
   fs/ocfs2/suballoc.c:1789:36: note: Access to field 'b_data' results in a dereference of a null pointer (loaded from variable 'group_bh')
                   bg = (struct ocfs2_group_desc *) group_bh->b_data;
                                                    ^~~~~~~~
>> fs/ocfs2/suballoc.c:2222:21: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
           BUG_ON(res.sr_bits != 1);
                              ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ocfs2/suballoc.c:2204:9: note: Assuming 'ac' is non-null
           BUG_ON(!ac);
                  ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ocfs2/suballoc.c:2204:2: note: Taking false branch
           BUG_ON(!ac);
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   fs/ocfs2/suballoc.c:2204:2: note: Loop condition is false.  Exiting loop
           BUG_ON(!ac);
           ^
   include/asm-generic/bug.h:183:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   fs/ocfs2/suballoc.c:2205:9: note: Assuming field 'ac_bits_given' is equal to 0
           BUG_ON(ac->ac_bits_given != 0);
                  ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ocfs2/suballoc.c:2205:2: note: Taking false branch
           BUG_ON(ac->ac_bits_given != 0);
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   fs/ocfs2/suballoc.c:2205:2: note: Loop condition is false.  Exiting loop
           BUG_ON(ac->ac_bits_given != 0);
           ^
   include/asm-generic/bug.h:183:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   fs/ocfs2/suballoc.c:2206:9: note: Assuming field 'ac_bits_wanted' is equal to 1
           BUG_ON(ac->ac_bits_wanted != 1);
                  ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ocfs2/suballoc.c:2206:2: note: Taking false branch
           BUG_ON(ac->ac_bits_wanted != 1);
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   fs/ocfs2/suballoc.c:2206:2: note: Loop condition is false.  Exiting loop
           BUG_ON(ac->ac_bits_wanted != 1);
           ^
   include/asm-generic/bug.h:183:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   fs/ocfs2/suballoc.c:2207:9: note: Assuming field 'ac_which' is equal to 3
           BUG_ON(ac->ac_which != OCFS2_AC_USE_INODE);
                  ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                      ~~~~~~~~~^~~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ocfs2/suballoc.c:2207:2: note: Taking false branch
           BUG_ON(ac->ac_which != OCFS2_AC_USE_INODE);
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   fs/ocfs2/suballoc.c:2207:2: note: Loop condition is false.  Exiting loop
           BUG_ON(ac->ac_which != OCFS2_AC_USE_INODE);
           ^
   include/asm-generic/bug.h:183:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   fs/ocfs2/suballoc.c:2211:11: note: Calling 'ocfs2_claim_suballoc_bits'
           status = ocfs2_claim_suballoc_bits(ac,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/suballoc.c:1890:2: note: Taking false branch
           BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
--
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:489:2: note: Taking false branch
           if (tree->rf_generation != le32_to_cpu(rb->rf_generation)) {
           ^
   fs/ocfs2/refcounttree.c:509:6: note: 'ref_bh' is non-null
           if (ref_bh) {
               ^~~~~~
   fs/ocfs2/refcounttree.c:509:2: note: Taking true branch
           if (ref_bh) {
           ^
   fs/ocfs2/refcounttree.c:515:2: note: Returning zero (loaded from 'ret'), which participates in a condition later
           return ret;
           ^~~~~~~~~~
   fs/ocfs2/refcounttree.c:4561:9: note: Returning from 'ocfs2_lock_refcount_tree'
                   ret = ocfs2_lock_refcount_tree(osb,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:4564:7: note: 'ret' is 0
                   if (ret) {
                       ^~~
   fs/ocfs2/refcounttree.c:4564:3: note: Taking false branch
                   if (ret) {
                   ^
   fs/ocfs2/refcounttree.c:4570:7: note: Assuming the condition is true
                   if (!(ext_flags & OCFS2_EXT_REFCOUNTED)) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:4570:3: note: Taking true branch
                   if (!(ext_flags & OCFS2_EXT_REFCOUNTED)) {
                   ^
   fs/ocfs2/refcounttree.c:4571:10: note: Calling 'ocfs2_add_refcount_flag'
                           ret = ocfs2_add_refcount_flag(s_inode, &s_et,
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:3700:8: note: Calling 'ocfs2_calc_refcount_meta_credits'
           ret = ocfs2_calc_refcount_meta_credits(inode->i_sb,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:2385:2: note: Loop condition is true.  Entering loop body
           while (clusters) {
           ^
   fs/ocfs2/refcounttree.c:2386:9: note: Calling 'ocfs2_get_refcount_rec'
                   ret = ocfs2_get_refcount_rec(ci, ref_root_bh,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:1075:6: note: Assuming the condition is false
           if (!(le32_to_cpu(rb->rf_flags) & OCFS2_REFCOUNT_TREE_FL)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:1075:2: note: Taking false branch
           if (!(le32_to_cpu(rb->rf_flags) & OCFS2_REFCOUNT_TREE_FL)) {
           ^
   fs/ocfs2/refcounttree.c:1086:6: note: Assuming field 'l_tree_depth' is not equal to 0
           if (el->l_tree_depth) {
               ^~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:1086:2: note: Taking true branch
           if (el->l_tree_depth) {
           ^
   fs/ocfs2/refcounttree.c:1088:7: note: Assuming 'ret' is 0
                   if (ret) {
                       ^~~
   fs/ocfs2/refcounttree.c:1088:3: note: Taking false branch
                   if (ret) {
                   ^
   fs/ocfs2/refcounttree.c:1096:7: note: Assuming field 'l_tree_depth' is not equal to 0
                   if (el->l_tree_depth) {
                       ^~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:1096:3: note: Taking true branch
                   if (el->l_tree_depth) {
                   ^
   fs/ocfs2/refcounttree.c:1101:4: note: Control jumps to line 1138
                           goto out;
                           ^
   fs/ocfs2/refcounttree.c:1139:2: note: Returning without writing to 'ret_rec->r_cpos'
           return ret;
           ^
   fs/ocfs2/refcounttree.c:1139:2: note: Returning value (loaded from 'ret'), which participates in a condition later
           return ret;
           ^~~~~~~~~~
   fs/ocfs2/refcounttree.c:2386:9: note: Returning from 'ocfs2_get_refcount_rec'
                   ret = ocfs2_get_refcount_rec(ci, ref_root_bh,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:2389:7: note: Assuming 'ret' is 0
                   if (ret) {
                       ^~~
   fs/ocfs2/refcounttree.c:2389:3: note: Taking false branch
                   if (ret) {
                   ^
   fs/ocfs2/refcounttree.c:2394:7: note: 'ref_leaf_bh' is equal to 'prev_bh'
                   if (ref_leaf_bh != prev_bh) {
                       ^~~~~~~~~~~
   fs/ocfs2/refcounttree.c:2394:3: note: Taking false branch
                   if (ref_leaf_bh != prev_bh) {
                   ^
   fs/ocfs2/refcounttree.c:2418:25: note: 1st function call argument is an uninitialized value
                                   (unsigned long long)le64_to_cpu(rec.r_cpos),
                                                       ^
   include/linux/byteorder/generic.h:87:21: note: expanded from macro 'le64_to_cpu'
   #define le64_to_cpu __le64_to_cpu
                       ^
   include/uapi/linux/byteorder/big_endian.h:32:26: note: expanded from macro '__le64_to_cpu'
   #define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x))
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/swab.h:128:28: note: expanded from macro '__swab64'
   #define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
                              ^                 ~~~~~~~~~~
>> fs/ocfs2/refcounttree.c:3644:17: warning: The left operand of '==' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
           BUG_ON(cow_len == 0);
                          ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ocfs2/refcounttree.c:3632:17: note: 'cow_len' declared without an initial value
           u32 cow_start, cow_len;
                          ^~~~~~~
   fs/ocfs2/refcounttree.c:3634:9: note: Assuming the condition is false
           BUG_ON(!ocfs2_is_refcount_inode(inode));
                  ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ocfs2/refcounttree.c:3634:2: note: Taking false branch
           BUG_ON(!ocfs2_is_refcount_inode(inode));
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   fs/ocfs2/refcounttree.c:3634:2: note: Loop condition is false.  Exiting loop
           BUG_ON(!ocfs2_is_refcount_inode(inode));
           ^
   include/asm-generic/bug.h:183:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   fs/ocfs2/refcounttree.c:3636:8: note: Calling 'ocfs2_refcount_cal_cow_clusters'
           ret = ocfs2_refcount_cal_cow_clusters(inode, &xv->xr_list,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:2646:2: note: Taking false branch
           BUG_ON(cpos + write_len > max_cpos);
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   fs/ocfs2/refcounttree.c:2646:2: note: Loop condition is false.  Exiting loop
           BUG_ON(cpos + write_len > max_cpos);
           ^
   include/asm-generic/bug.h:183:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   fs/ocfs2/refcounttree.c:2648:6: note: Assuming 'tree_height' is > 0
           if (tree_height > 0) {
               ^~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:2648:2: note: Taking true branch
           if (tree_height > 0) {
           ^
   fs/ocfs2/refcounttree.c:2650:7: note: Assuming 'ret' is 0
                   if (ret) {
                       ^~~
   fs/ocfs2/refcounttree.c:2650:3: note: Taking false branch
                   if (ret) {
                   ^
   fs/ocfs2/refcounttree.c:2658:7: note: Assuming field 'l_tree_depth' is not equal to 0
                   if (el->l_tree_depth) {
                       ^~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:2658:3: note: Taking true branch
                   if (el->l_tree_depth) {
                   ^
   fs/ocfs2/refcounttree.c:2663:4: note: Control jumps to line 2823
                           goto out;
                           ^
   fs/ocfs2/refcounttree.c:2824:2: note: Returning without writing to '*cow_len'
           return ret;
           ^
   fs/ocfs2/refcounttree.c:2824:2: note: Returning value (loaded from 'ret'), which participates in a condition later
           return ret;
           ^~~~~~~~~~
   fs/ocfs2/refcounttree.c:3636:8: note: Returning from 'ocfs2_refcount_cal_cow_clusters'
           ret = ocfs2_refcount_cal_cow_clusters(inode, &xv->xr_list,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ocfs2/refcounttree.c:3639:6: note: Assuming 'ret' is 0
           if (ret) {
               ^~~
   fs/ocfs2/refcounttree.c:3639:2: note: Taking false branch
           if (ret) {
           ^
   fs/ocfs2/refcounttree.c:3644:17: note: The left operand of '==' is a garbage value
           BUG_ON(cow_len == 0);
                          ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   Suppressed 16 warnings (3 in non-user code, 13 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   17 warnings generated.
   Suppressed 17 warnings (4 in non-user code, 13 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   17 warnings generated.
   Suppressed 17 warnings (4 in non-user code, 13 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

vim +2222 fs/ocfs2/suballoc.c

e49e27674d1dd2 Mark Fasheh 2010-08-13  2192  
1ed9b777f77929 Joel Becker 2010-05-06  2193  int ocfs2_claim_new_inode(handle_t *handle,
138211515c1028 Tao Ma      2009-02-25  2194  			  struct inode *dir,
138211515c1028 Tao Ma      2009-02-25  2195  			  struct buffer_head *parent_fe_bh,
ccd979bdbce9fb Mark Fasheh 2005-12-15  2196  			  struct ocfs2_alloc_context *ac,
2b6cb576aa8061 Joel Becker 2010-03-26  2197  			  u64 *suballoc_loc,
ccd979bdbce9fb Mark Fasheh 2005-12-15  2198  			  u16 *suballoc_bit,
ccd979bdbce9fb Mark Fasheh 2005-12-15  2199  			  u64 *fe_blkno)
ccd979bdbce9fb Mark Fasheh 2005-12-15  2200  {
ccd979bdbce9fb Mark Fasheh 2005-12-15  2201  	int status;
2b6cb576aa8061 Joel Becker 2010-03-26  2202  	struct ocfs2_suballoc_result res;
ccd979bdbce9fb Mark Fasheh 2005-12-15  2203  
ccd979bdbce9fb Mark Fasheh 2005-12-15  2204  	BUG_ON(!ac);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2205  	BUG_ON(ac->ac_bits_given != 0);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2206  	BUG_ON(ac->ac_bits_wanted != 1);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2207  	BUG_ON(ac->ac_which != OCFS2_AC_USE_INODE);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2208  
138211515c1028 Tao Ma      2009-02-25  2209  	ocfs2_init_inode_ac_group(dir, parent_fe_bh, ac);
138211515c1028 Tao Ma      2009-02-25  2210  
aa8f8e93c898a0 Joel Becker 2010-03-26  2211  	status = ocfs2_claim_suballoc_bits(ac,
da5cbf2f9df922 Mark Fasheh 2006-10-06  2212  					   handle,
ccd979bdbce9fb Mark Fasheh 2005-12-15  2213  					   1,
ccd979bdbce9fb Mark Fasheh 2005-12-15  2214  					   1,
7d1fe093bf0412 Joel Becker 2010-04-13  2215  					   &res);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2216  	if (status < 0) {
ccd979bdbce9fb Mark Fasheh 2005-12-15  2217  		mlog_errno(status);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2218  		goto bail;
ccd979bdbce9fb Mark Fasheh 2005-12-15  2219  	}
1ed9b777f77929 Joel Becker 2010-05-06  2220  	atomic_inc(&OCFS2_SB(ac->ac_inode->i_sb)->alloc_stats.bg_allocs);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2221  
7d1fe093bf0412 Joel Becker 2010-04-13 @2222  	BUG_ON(res.sr_bits != 1);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2223  
2b6cb576aa8061 Joel Becker 2010-03-26  2224  	*suballoc_loc = res.sr_bg_blkno;
7d1fe093bf0412 Joel Becker 2010-04-13  2225  	*suballoc_bit = res.sr_bit_offset;
ba2066351b630f Joel Becker 2010-03-26  2226  	*fe_blkno = res.sr_blkno;
ccd979bdbce9fb Mark Fasheh 2005-12-15  2227  	ac->ac_bits_given++;
138211515c1028 Tao Ma      2009-02-25  2228  	ocfs2_save_inode_ac_group(dir, ac);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2229  	status = 0;
ccd979bdbce9fb Mark Fasheh 2005-12-15  2230  bail:
c1e8d35ef5ffb3 Tao Ma      2011-03-07  2231  	if (status)
c1e8d35ef5ffb3 Tao Ma      2011-03-07  2232  		mlog_errno(status);
ccd979bdbce9fb Mark Fasheh 2005-12-15  2233  	return status;
ccd979bdbce9fb Mark Fasheh 2005-12-15  2234  }
ccd979bdbce9fb Mark Fasheh 2005-12-15  2235  

:::::: The code at line 2222 was first introduced by commit
:::::: 7d1fe093bf04124dcc50c5dde1765bd098464bfa ocfs2: Pass suballocation results back via a structure.

:::::: TO: Joel Becker <joel.becker@oracle.com>
:::::: CC: Tao Ma <tao.ma@oracle.com>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30384 bytes --]

                 reply	other threads:[~2021-08-28 20:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108290434.xbU13spO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.