From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: fs/afs/server.c:375:5-24: WARNING: atomic_dec_and_test variation before object free at line 383.
Date: Wed, 21 May 2025 00:52:38 +0800 [thread overview]
Message-ID: <202505210027.EOM219DU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a5806cd506af5a7c19bcd596e4708b5c464bfd21
commit: 4882ba78574e2d8c579658f65f6784b0d139d173 afs: Fix afs_server ref accounting
date: 2 months ago
config: loongarch-randconfig-r061-20250520 (https://download.01.org/0day-ci/archive/20250521/202505210027.EOM219DU-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 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/202505210027.EOM219DU-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/afs/server.c:375:5-24: WARNING: atomic_dec_and_test variation before object free at line 383.
fs/afs/server.c:357:5-24: WARNING: atomic_dec_and_test variation before object free at line 360.
vim +375 fs/afs/server.c
365
366 /*
367 * Drop an active count on a server object.
368 */
369 void afs_unuse_server(struct afs_net *net, struct afs_server *server,
370 enum afs_server_trace reason)
371 {
372 if (!server)
373 return;
374
> 375 if (atomic_dec_and_test(&server->active)) {
376 if (!test_bit(AFS_SERVER_FL_EXPIRED, &server->flags) &&
377 READ_ONCE(server->cell->state) < AFS_CELL_FAILED) {
378 time64_t unuse_time = ktime_get_real_seconds();
379
380 server->unuse_time = unuse_time;
381 afs_set_server_timer(server, afs_server_gc_delay);
382 } else {
> 383 schedule_work(&server->destroyer);
384 }
385 }
386
387 afs_put_server(net, server, reason);
388 }
389
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-05-20 16:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 16:52 kernel test robot [this message]
2026-06-02 2:09 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=202505210027.EOM219DU-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®