All of lore.kernel.org
 help / color / mirror / Atom feed
* [djwong-xfs:xfile-page-caching 153/205] fs/xfs/xfs_swapext_item.c:61:5-24: WARNING: atomic_dec_and_test variation before object free at line 62.
@ 2023-12-12 21:15 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-12-12 21:15 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall, Elena Reshetova

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Darrick J. Wong" <darrick.wong@oracle.com>

Hi Darrick,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git xfile-page-caching
head:   ae5732f1c245c24e63c885992c35f723f36f79ff
commit: a562ed8cb6973bf07f2ddf4e49f1386ef4e7a5ce [153/205] xfs: create deferred log items for extent swapping
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: x86_64-randconfig-102-20231212 (https://download.01.org/0day-ci/archive/20231213/202312130510.ynNaaxfS-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231213/202312130510.ynNaaxfS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202312130510.ynNaaxfS-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/xfs/xfs_swapext_item.c:61:5-24: WARNING: atomic_dec_and_test variation before object free at line 62.

vim +61 fs/xfs/xfs_swapext_item.c

2db151f2e053ec Darrick J. Wong 2023-03-06  48  
2db151f2e053ec Darrick J. Wong 2023-03-06  49  /*
2db151f2e053ec Darrick J. Wong 2023-03-06  50   * Freeing the SXI requires that we remove it from the AIL if it has already
2db151f2e053ec Darrick J. Wong 2023-03-06  51   * been placed there. However, the SXI may not yet have been placed in the AIL
2db151f2e053ec Darrick J. Wong 2023-03-06  52   * when called by xfs_sxi_release() from SXD processing due to the ordering of
2db151f2e053ec Darrick J. Wong 2023-03-06  53   * committed vs unpin operations in bulk insert operations. Hence the reference
2db151f2e053ec Darrick J. Wong 2023-03-06  54   * count to ensure only the last caller frees the SXI.
2db151f2e053ec Darrick J. Wong 2023-03-06  55   */
2db151f2e053ec Darrick J. Wong 2023-03-06  56  STATIC void
2db151f2e053ec Darrick J. Wong 2023-03-06  57  xfs_sxi_release(
2db151f2e053ec Darrick J. Wong 2023-03-06  58  	struct xfs_sxi_log_item	*sxi_lip)
2db151f2e053ec Darrick J. Wong 2023-03-06  59  {
2db151f2e053ec Darrick J. Wong 2023-03-06  60  	ASSERT(atomic_read(&sxi_lip->sxi_refcount) > 0);
2db151f2e053ec Darrick J. Wong 2023-03-06 @61  	if (atomic_dec_and_test(&sxi_lip->sxi_refcount)) {
2db151f2e053ec Darrick J. Wong 2023-03-06 @62  		xfs_trans_ail_delete(&sxi_lip->sxi_item, 0);
2db151f2e053ec Darrick J. Wong 2023-03-06  63  		xfs_sxi_item_free(sxi_lip);
2db151f2e053ec Darrick J. Wong 2023-03-06  64  	}
2db151f2e053ec Darrick J. Wong 2023-03-06  65  }
2db151f2e053ec Darrick J. Wong 2023-03-06  66  

:::::: The code at line 61 was first introduced by commit
:::::: 2db151f2e053ec58ea6f4a37325eec5aff35d5f5 xfs: introduce a swap-extent log intent item

:::::: TO: Darrick J. Wong <djwong@kernel.org>
:::::: CC: Darrick J. Wong <djwong@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [djwong-xfs:xfile-page-caching 153/205] fs/xfs/xfs_swapext_item.c:61:5-24: WARNING: atomic_dec_and_test variation before object free at line 62.
@ 2024-01-03 11:56 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-01-03 11:56 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall, Elena Reshetova

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Darrick J. Wong" <darrick.wong@oracle.com>

Hi Darrick,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git xfile-page-caching
head:   b18189bccabcaf5598270916c6cd355f8486f30e
commit: a562ed8cb6973bf07f2ddf4e49f1386ef4e7a5ce [153/205] xfs: create deferred log items for extent swapping
:::::: branch date: 2 days ago
:::::: commit date: 4 weeks ago
config: x86_64-randconfig-102-20231212 (https://download.01.org/0day-ci/archive/20240103/202401031943.jhIJwRO1-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202401031943.jhIJwRO1-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/xfs/xfs_swapext_item.c:61:5-24: WARNING: atomic_dec_and_test variation before object free at line 62.

vim +61 fs/xfs/xfs_swapext_item.c

2db151f2e053ec Darrick J. Wong 2023-03-06  48  
2db151f2e053ec Darrick J. Wong 2023-03-06  49  /*
2db151f2e053ec Darrick J. Wong 2023-03-06  50   * Freeing the SXI requires that we remove it from the AIL if it has already
2db151f2e053ec Darrick J. Wong 2023-03-06  51   * been placed there. However, the SXI may not yet have been placed in the AIL
2db151f2e053ec Darrick J. Wong 2023-03-06  52   * when called by xfs_sxi_release() from SXD processing due to the ordering of
2db151f2e053ec Darrick J. Wong 2023-03-06  53   * committed vs unpin operations in bulk insert operations. Hence the reference
2db151f2e053ec Darrick J. Wong 2023-03-06  54   * count to ensure only the last caller frees the SXI.
2db151f2e053ec Darrick J. Wong 2023-03-06  55   */
2db151f2e053ec Darrick J. Wong 2023-03-06  56  STATIC void
2db151f2e053ec Darrick J. Wong 2023-03-06  57  xfs_sxi_release(
2db151f2e053ec Darrick J. Wong 2023-03-06  58  	struct xfs_sxi_log_item	*sxi_lip)
2db151f2e053ec Darrick J. Wong 2023-03-06  59  {
2db151f2e053ec Darrick J. Wong 2023-03-06  60  	ASSERT(atomic_read(&sxi_lip->sxi_refcount) > 0);
2db151f2e053ec Darrick J. Wong 2023-03-06 @61  	if (atomic_dec_and_test(&sxi_lip->sxi_refcount)) {
2db151f2e053ec Darrick J. Wong 2023-03-06 @62  		xfs_trans_ail_delete(&sxi_lip->sxi_item, 0);
2db151f2e053ec Darrick J. Wong 2023-03-06  63  		xfs_sxi_item_free(sxi_lip);
2db151f2e053ec Darrick J. Wong 2023-03-06  64  	}
2db151f2e053ec Darrick J. Wong 2023-03-06  65  }
2db151f2e053ec Darrick J. Wong 2023-03-06  66  

:::::: The code at line 61 was first introduced by commit
:::::: 2db151f2e053ec58ea6f4a37325eec5aff35d5f5 xfs: introduce a swap-extent log intent item

:::::: TO: Darrick J. Wong <djwong@kernel.org>
:::::: CC: Darrick J. Wong <djwong@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-03 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 21:15 [djwong-xfs:xfile-page-caching 153/205] fs/xfs/xfs_swapext_item.c:61:5-24: WARNING: atomic_dec_and_test variation before object free at line 62 kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-01-03 11:56 kernel test robot

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.