The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>
Subject: kernel/bpf/token.c:50:6-27: WARNING: atomic_dec_and_test variation before object free at line 54.
Date: Thu, 19 Dec 2024 05:18:47 +0800	[thread overview]
Message-ID: <202412190521.9R1HKuug-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c061cf420ded391e32f99cd483e1e0107f213b12
commit: 35f96de04127d332a5c5e8a155d31f452f88c76d bpf: Introduce BPF token object
date:   11 months ago
config: hexagon-randconfig-r051-20241218 (https://download.01.org/0day-ci/archive/20241219/202412190521.9R1HKuug-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 2dc22615fd46ab2566d0f26d5ba234ab12dc4bf8)

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/202412190521.9R1HKuug-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> kernel/bpf/token.c:50:6-27: WARNING: atomic_dec_and_test variation before object free at line 54.

vim +50 kernel/bpf/token.c

    44	
    45	void bpf_token_put(struct bpf_token *token)
    46	{
    47		if (!token)
    48			return;
    49	
  > 50		if (!atomic64_dec_and_test(&token->refcnt))
    51			return;
    52	
    53		INIT_WORK(&token->work, bpf_token_put_deferred);
  > 54		schedule_work(&token->work);
    55	}
    56	

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

             reply	other threads:[~2024-12-18 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 21:18 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-31  9:01 kernel/bpf/token.c:50:6-27: WARNING: atomic_dec_and_test variation before object free at line 54 kernel test robot
2024-10-13  6:58 kernel test robot
2024-10-14 20:13 ` Andrii Nakryiko

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=202412190521.9R1HKuug-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --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