[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202412292037.LXlYSHKl-lkp@intel.com>
Date: Sun, 29 Dec 2024 20:27:36 +0800
From: kernel test robot <lkp@...el.com>
To: Alexei Starovoitov <ast@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>,
Barret Rhoden <brho@...gle.com>
Subject: kernel/bpf/arena.c:245:6-25: WARNING: atomic_dec_and_test variation
before object free at line 249.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 059dd502b263d8a4e2a84809cf1068d6a3905e6f
commit: b90d77e5fd784ada62ddd714d15ee2400c28e1cf bpf: Fix remap of arena.
date: 6 months ago
config: x86_64-randconfig-104-20241229 (https://download.01.org/0day-ci/archive/20241229/202412292037.LXlYSHKl-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
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/202412292037.LXlYSHKl-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> kernel/bpf/arena.c:245:6-25: WARNING: atomic_dec_and_test variation before object free at line 249.
vim +245 kernel/bpf/arena.c
238
239 static void arena_vm_close(struct vm_area_struct *vma)
240 {
241 struct bpf_map *map = vma->vm_file->private_data;
242 struct bpf_arena *arena = container_of(map, struct bpf_arena, map);
243 struct vma_list *vml = vma->vm_private_data;
244
> 245 if (!atomic_dec_and_test(&vml->mmap_count))
246 return;
247 guard(mutex)(&arena->lock);
248 /* update link list under lock */
> 249 list_del(&vml->head);
250 vma->vm_private_data = NULL;
251 kfree(vml);
252 }
253
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists