mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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,
	Christian Brauner <brauner@kernel.org>,
	Dominique Martinet <asmadeus@codewreck.org>
Subject: fs/netfs/objects.c:148:5-24: WARNING: atomic_dec_and_test variation before object free at line 150.
Date: Sun, 1 Dec 2024 03:46:20 +0800	[thread overview]
Message-ID: <202412010523.B4dXJKXN-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d8b78066f4c9c8ec898bd4246fc4db31d476dd88
commit: f89ea63f1c65d3e93b255f14f9d9e05df87955fa netfs, 9p: Fix race between umount and async request completion
date:   6 months ago
config: openrisc-randconfig-r061-20241130 (https://download.01.org/0day-ci/archive/20241201/202412010523.B4dXJKXN-lkp@intel.com/config)
compiler: or1k-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/202412010523.B4dXJKXN-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/netfs/objects.c:148:5-24: WARNING: atomic_dec_and_test variation before object free at line 150.

vim +148 fs/netfs/objects.c

   123	
   124	static void netfs_free_request(struct work_struct *work)
   125	{
   126		struct netfs_io_request *rreq =
   127			container_of(work, struct netfs_io_request, work);
   128		struct netfs_inode *ictx = netfs_inode(rreq->inode);
   129		unsigned int i;
   130	
   131		trace_netfs_rreq(rreq, netfs_rreq_trace_free);
   132		netfs_proc_del_rreq(rreq);
   133		netfs_clear_subrequests(rreq, false);
   134		if (rreq->netfs_ops->free_request)
   135			rreq->netfs_ops->free_request(rreq);
   136		if (rreq->cache_resources.ops)
   137			rreq->cache_resources.ops->end_operation(&rreq->cache_resources);
   138		if (rreq->direct_bv) {
   139			for (i = 0; i < rreq->direct_bv_count; i++) {
   140				if (rreq->direct_bv[i].bv_page) {
   141					if (rreq->direct_bv_unpin)
   142						unpin_user_page(rreq->direct_bv[i].bv_page);
   143				}
   144			}
   145			kvfree(rreq->direct_bv);
   146		}
   147	
 > 148		if (atomic_dec_and_test(&ictx->io_count))
   149			wake_up_var(&ictx->io_count);
 > 150		call_rcu(&rreq->rcu, netfs_free_request_rcu);
   151	}
   152	

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

             reply	other threads:[~2024-11-30 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-30 19:46 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-08 15:24 kernel test robot
2024-09-08 19:26 ` David Howells

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=202412010523.B4dXJKXN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asmadeus@codewreck.org \
    --cc=brauner@kernel.org \
    --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

Powered by JetHome