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: <7fe03eff-a6d4-7036-4dee-9ce9a04fd08a@intel.com>
Date:   Tue, 19 Oct 2021 16:01:24 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     "Darrick J. Wong" <djwong@...nel.org>
CC:     <llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
        "Darrick J. Wong" <darrick.wong@...cle.com>,
        <linux-kernel@...r.kernel.org>
Subject: [djwong-xfs:vectorized-scrub 196/308]
 fs/xfs/libxfs/xfs_alloc.c:2564:3: warning: Value stored to 'agno' is never
 read [clang-analyzer-deadcode.DeadStores]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub
head:   d404c6b945070ba14d8db1ee79daa5df149877df
commit: 13631516b02090441a5c788ae69b076009c44418 [196/308] xfs: support logging EFIs for realtime extents
config: arm-randconfig-c002-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
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 arm cross compiling tool for clang build
         # apt-get install binutils-arm-linux-gnueabi
         # https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=13631516b02090441a5c788ae69b076009c44418
         git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
         git fetch --no-tags djwong-xfs vectorized-scrub
         git checkout 13631516b02090441a5c788ae69b076009c44418
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer

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


clang-analyzer warnings: (new ones prefixed by >>)

 >> fs/xfs/libxfs/xfs_alloc.c:2564:3: warning: Value stored to 'agno' is never read [clang-analyzer-deadcode.DeadStores]
                    agno = 0;
                    ^      ~
 >> fs/xfs/libxfs/xfs_alloc.c:2565:3: warning: Value stored to 'agbno' is never read [clang-analyzer-deadcode.DeadStores]
                    agbno = bno;
                    ^       ~~~


vim +/agno +2564 fs/xfs/libxfs/xfs_alloc.c

f8f2835a9cf300 Brian Foster    2018-05-07  2540
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2541  /*
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2542   * Add the extent to the list of extents to be free at transaction end.
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2543   * The list is maintained sorted (by block number).
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2544   */
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2545  void
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2546  xfs_free_extent_later(
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2547  	struct xfs_trans		*tp,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2548  	xfs_fsblock_t			bno,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2549  	xfs_filblks_t			len,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2550  	const struct xfs_owner_info	*oinfo,
30bb91bc0f3b93 Darrick J. Wong 2021-09-01  2551  	unsigned int			flags)
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2552  {
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2553  	struct xfs_extent_free_item	*new;		/* new element */
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2554  #ifdef DEBUG
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2555  	struct xfs_mount		*mp = tp->t_mountp;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2556  	xfs_agnumber_t			agno;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2557  	xfs_agblock_t			agbno;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2558
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2559  	ASSERT(bno != NULLFSBLOCK);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2560  	ASSERT(len > 0);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2561  	ASSERT(len <= MAXEXTLEN);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2562  	ASSERT(!isnullstartblock(bno));
13631516b02090 Darrick J. Wong 2021-09-01  2563  	if (flags & XFS_FREE_EXTENT_REALTIME) {
13631516b02090 Darrick J. Wong 2021-09-01 @2564  		agno = 0;
13631516b02090 Darrick J. Wong 2021-09-01 @2565  		agbno = bno;
13631516b02090 Darrick J. Wong 2021-09-01  2566  		ASSERT(bno < mp->m_sb.sb_rblocks);
13631516b02090 Darrick J. Wong 2021-09-01  2567  		ASSERT(len <= mp->m_sb.sb_rblocks);
13631516b02090 Darrick J. Wong 2021-09-01  2568  		ASSERT(bno + len <= mp->m_sb.sb_rblocks);
13631516b02090 Darrick J. Wong 2021-09-01  2569  	} else {
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2570  		agno = XFS_FSB_TO_AGNO(mp, bno);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2571  		agbno = XFS_FSB_TO_AGBNO(mp, bno);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2572  		ASSERT(agno < mp->m_sb.sb_agcount);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2573  		ASSERT(agbno < mp->m_sb.sb_agblocks);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2574  		ASSERT(len < mp->m_sb.sb_agblocks);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2575  		ASSERT(agbno + len <= mp->m_sb.sb_agblocks);
13631516b02090 Darrick J. Wong 2021-09-01  2576  	}
30bb91bc0f3b93 Darrick J. Wong 2021-09-01  2577  	ASSERT(!(flags & ~XFS_FREE_EXTENT_ALL_FLAGS));
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2578  #endif
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2579  	ASSERT(xfs_extent_free_item_zone != NULL);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2580
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2581  	new = kmem_cache_alloc(xfs_extent_free_item_zone,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2582  			       GFP_KERNEL | __GFP_NOFAIL);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2583  	new->xefi_startblock = bno;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2584  	new->xefi_blockcount = (xfs_extlen_t)len;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2585  	if (oinfo)
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2586  		new->xefi_oinfo = *oinfo;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2587  	else
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2588  		new->xefi_oinfo = XFS_RMAP_OINFO_SKIP_UPDATE;
30bb91bc0f3b93 Darrick J. Wong 2021-09-01  2589  	new->xefi_skip_discard = !!(flags & XFS_FREE_EXTENT_SKIP_DISCARD);
13631516b02090 Darrick J. Wong 2021-09-01  2590  	new->xefi_realtime = !!(flags & XFS_FREE_EXTENT_REALTIME);
5262e94653712f Darrick J. Wong 2021-09-01  2591
5262e94653712f Darrick J. Wong 2021-09-01  2592  	trace_xfs_extent_free_defer(tp->t_mountp, XFS_FREE_EXTENT_REGULAR,
5262e94653712f Darrick J. Wong 2021-09-01  2593  			new);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2594  	xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_FREE, &new->xefi_list);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2595  }
0c34a6f15b5c3a Darrick J. Wong 2021-09-01  2596

---
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" (33030 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ