From: kernel test robot <lkp@intel.com>
To: Benjamin Coddington <bcodding@hammerspace.com>
Cc: oe-kbuild-all@lists.linux.dev, Chuck Lever <cel@kernel.org>
Subject: [cel:nfsd-testing 295/295] fs/lockd/svcsubs.c:428:5-24: WARNING: atomic_dec_and_test variation before object free at line 429.
Date: Tue, 06 Oct 2026 00:00:44 +0200 [thread overview]
Message-ID: <202610052357.ZfzEOheQ-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd-testing
head: 56589cdb58819ce54decedbbfddf231d94b5ce41
commit: 56589cdb58819ce54decedbbfddf231d94b5ce41 [295/295] lockd: make the nlm_file reference count atomic
config: x86_64-randconfig-2101-20261005 (https://download.01.org/0day-ci/archive/20261005/202610052357.ZfzEOheQ-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610052357.ZfzEOheQ-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/lockd/svcsubs.c:428:5-24: WARNING: atomic_dec_and_test variation before object free at line 429.
vim +428 fs/lockd/svcsubs.c
408
409 /*
410 * Release file. If there are no more remote locks on this file,
411 * close it and free the handle.
412 *
413 * Note that we can't do proper reference counting without major
414 * contortions because the code in fs/locks.c creates, deletes and
415 * splits locks without notification. Our only way is to walk the
416 * entire lock list each time we remove a lock.
417 */
418 void
419 nlm_release_file(struct nlm_file *file)
420 {
421 dprintk("lockd: nlm_release_file(%p, ct = %d)\n",
422 file, atomic_read(&file->f_count));
423
424 /* Lock file table */
425 mutex_lock(&nlm_file_mutex);
426
427 /* If there are no more locks etc, delete the file */
> 428 if (atomic_dec_and_test(&file->f_count) && !nlm_file_inuse(file))
> 429 nlm_delete_file(file);
430
431 mutex_unlock(&nlm_file_mutex);
432 }
433
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-10-05 22:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 22:00 kernel test robot [this message]
2026-10-06 14:15 ` [cel:nfsd-testing 295/295] fs/lockd/svcsubs.c:428:5-24: WARNING: atomic_dec_and_test variation before object free at line 429 Benjamin Coddington
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=202610052357.ZfzEOheQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=bcodding@hammerspace.com \
--cc=cel@kernel.org \
--cc=oe-kbuild-all@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.