From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>,
Elena Reshetova <elena.reshetova@intel.com>
Subject: [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.
Date: Wed, 3 Jan 2024 19:56:02 +0800 [thread overview]
Message-ID: <202401031943.jhIJwRO1-lkp@intel.com> (raw)
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
next reply other threads:[~2024-01-03 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 11:56 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
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
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=202401031943.jhIJwRO1-lkp@intel.com \
--to=lkp@intel.com \
--cc=elena.reshetova@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@lists.linux.dev \
/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.