[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202410311704.yIRxjp0C-lkp@intel.com>
Date: Thu, 31 Oct 2024 17:01:35 +0800
From: kernel test robot <lkp@...el.com>
To: Andrii Nakryiko <andrii@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>
Subject: kernel/bpf/token.c:50:6-27: WARNING: atomic_dec_and_test variation
before object free at line 54.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0fc810ae3ae110f9e2fcccce80fc8c8d62f97907
commit: 35f96de04127d332a5c5e8a155d31f452f88c76d bpf: Introduce BPF token object
date: 9 months ago
config: i386-randconfig-051-20241031 (https://download.01.org/0day-ci/archive/20241031/202410311704.yIRxjp0C-lkp@intel.com/config)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)
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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410311704.yIRxjp0C-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
Powered by blists - more mailing lists