* [akpm-mm:mm-unstable 33/408] mm/mmap_lock.c:572:14-33: WARNING: atomic_dec_and_test variation before object free at line 574.
@ 2026-11-25 9:34 kernel test robot
2026-11-25 10:56 ` Vlastimil Babka (SUSE)
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-11-25 9:34 UTC (permalink / raw)
To: Lorenzo Stoakes (ARM)
Cc: oe-kbuild-all, David Hildenbrand, Andrew Morton,
Linux Memory Management List, mm-commits, Suren Baghdasaryan,
Vlastimil Babka (SUSE)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: c8117bff684306f5c1f959d055cc2b24dd67b1eb
commit: 549e0b6c9835de4cc4e8e4a56459ef09febfc2f7 [33/408] mm/vma: drop mm asynchronously in vma_start_read()
config: sh-randconfig-r2100-20261125 (https://download.01.org/0day-ci/archive/20261125/20261125102827.xQ94ZCi1-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.5.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/20261125102827.xQ94ZCi1-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> mm/mmap_lock.c:572:14-33: WARNING: atomic_dec_and_test variation before object free at line 574.
vim +572 mm/mmap_lock.c
569
570 void mmdrop_async(struct mm_struct *mm)
571 {
> 572 if (unlikely(atomic_dec_and_test(&mm->mm_count))) {
573 INIT_WORK(&mm->async_put_work, mmdrop_async_fn);
> 574 schedule_work(&mm->async_put_work);
575 }
576 }
577
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [akpm-mm:mm-unstable 33/408] mm/mmap_lock.c:572:14-33: WARNING: atomic_dec_and_test variation before object free at line 574.
2026-11-25 9:34 [akpm-mm:mm-unstable 33/408] mm/mmap_lock.c:572:14-33: WARNING: atomic_dec_and_test variation before object free at line 574 kernel test robot
@ 2026-11-25 10:56 ` Vlastimil Babka (SUSE)
0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-11-25 10:56 UTC (permalink / raw)
To: kernel test robot, Lorenzo Stoakes (ARM)
Cc: oe-kbuild-all, David Hildenbrand, Andrew Morton,
Linux Memory Management List, mm-commits, Suren Baghdasaryan
On 11/25/26 10:34, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: c8117bff684306f5c1f959d055cc2b24dd67b1eb
> commit: 549e0b6c9835de4cc4e8e4a56459ef09febfc2f7 [33/408] mm/vma: drop mm asynchronously in vma_start_read()
> config: sh-randconfig-r2100-20261125 (https://download.01.org/0day-ci/archive/20261125/20261125102827.xQ94ZCi1-lkp@intel.com/config)
> compiler: sh4-linux-gcc (GCC) 12.5.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/20261125102827.xQ94ZCi1-lkp@intel.com/
>
> cocci warnings: (new ones prefixed by >>)
>>> mm/mmap_lock.c:572:14-33: WARNING: atomic_dec_and_test variation before object free at line 574.
So AFAIU this is a suggestion to use refcount_t instead of atomic_t in new
code, but this is a move of an existing code and intended to be a minimal
fix. So we can ignore.
(this is intended for saving Lorenzo a reply, let's see if he can resist :)
> vim +572 mm/mmap_lock.c
>
> 569
> 570 void mmdrop_async(struct mm_struct *mm)
> 571 {
> > 572 if (unlikely(atomic_dec_and_test(&mm->mm_count))) {
> 573 INIT_WORK(&mm->async_put_work, mmdrop_async_fn);
> > 574 schedule_work(&mm->async_put_work);
> 575 }
> 576 }
> 577
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-25 10:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 9:34 [akpm-mm:mm-unstable 33/408] mm/mmap_lock.c:572:14-33: WARNING: atomic_dec_and_test variation before object free at line 574 kernel test robot
2026-11-25 10:56 ` Vlastimil Babka (SUSE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox