CC: kbuild-all(a)lists.01.org
CC: "Darrick J. Wong" <darrick.wong(a)oracle.com>
TO: "Darrick J. Wong" <darrick.wong(a)oracle.com>
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
repair-xattrs
head: d5d149783d8dcc57cbe92d25e2773c56ae75b2ef
commit: 3f892b61199a8a5b447bc3f1cab0e5fcc2a949f9 [115/133] xfs: introduce a swap-extent
log intent item
:::::: branch date: 16 hours ago
:::::: commit date: 16 hours ago
config: x86_64-randconfig-c002-20200701 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
> fs/xfs/xfs_swapext_item.c:56:5-24: atomic_dec_and_test variation
before object free at line 57.
#
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git remote update djwong-xfs
git checkout 3f892b61199a8a5b447bc3f1cab0e5fcc2a949f9
vim +56 fs/xfs/xfs_swapext_item.c
3f892b61199a8a Darrick J. Wong 2020-06-25 43
3f892b61199a8a Darrick J. Wong 2020-06-25 44 /*
3f892b61199a8a Darrick J. Wong 2020-06-25 45 * Freeing the SXI requires that we remove
it from the AIL if it has already
3f892b61199a8a Darrick J. Wong 2020-06-25 46 * been placed there. However, the SXI may
not yet have been placed in the AIL
3f892b61199a8a Darrick J. Wong 2020-06-25 47 * when called by xfs_sxi_release() from
SXD processing due to the ordering of
3f892b61199a8a Darrick J. Wong 2020-06-25 48 * committed vs unpin operations in bulk
insert operations. Hence the reference
3f892b61199a8a Darrick J. Wong 2020-06-25 49 * count to ensure only the last caller
frees the SXI.
3f892b61199a8a Darrick J. Wong 2020-06-25 50 */
3f892b61199a8a Darrick J. Wong 2020-06-25 51 STATIC void
3f892b61199a8a Darrick J. Wong 2020-06-25 52 xfs_sxi_release(
3f892b61199a8a Darrick J. Wong 2020-06-25 53 struct xfs_sxi_log_item *sxi_lip)
3f892b61199a8a Darrick J. Wong 2020-06-25 54 {
3f892b61199a8a Darrick J. Wong 2020-06-25 55
ASSERT(atomic_read(&sxi_lip->sxi_refcount) > 0);
3f892b61199a8a Darrick J. Wong 2020-06-25 @56 if
(atomic_dec_and_test(&sxi_lip->sxi_refcount)) {
3f892b61199a8a Darrick J. Wong 2020-06-25 @57
xfs_trans_ail_delete(&sxi_lip->sxi_item, SHUTDOWN_LOG_IO_ERROR);
3f892b61199a8a Darrick J. Wong 2020-06-25 58 xfs_sxi_item_free(sxi_lip);
3f892b61199a8a Darrick J. Wong 2020-06-25 59 }
3f892b61199a8a Darrick J. Wong 2020-06-25 60 }
3f892b61199a8a Darrick J. Wong 2020-06-25 61
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org