================================================================== BUG: KCSAN: data-race in __count_memcg_events / mem_cgroup_css_rstat_flush write to 0xffff888237d344c0 of 4 bytes by task 3701 on cpu 0: mem_cgroup_css_rstat_flush+0x4ea/0x540 mm/memcontrol.c:5848 cgroup_rstat_flush_locked+0x848/0x980 kernel/cgroup/rstat.c:245 cgroup_rstat_flush+0x26/0x40 kernel/cgroup/rstat.c:277 do_flush_stats mm/memcontrol.c:745 [inline] flush_memcg_stats_dwork+0x50/0x90 mm/memcontrol.c:782 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335 worker_thread+0x526/0x730 kernel/workqueue.c:3416 kthread+0x1d1/0x210 kernel/kthread.c:388 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 read-write to 0xffff888237d344c0 of 4 bytes by task 8950 on cpu 1: memcg_rstat_updated mm/memcontrol.c:725 [inline] __count_memcg_events+0xce/0x130 mm/memcontrol.c:962 folio_activate_fn+0x4d9/0x5e0 mm/swap.c:353 folio_batch_move_lru+0x20c/0x2c0 mm/swap.c:233 folio_batch_add_and_move mm/swap.c:249 [inline] folio_activate+0x15d/0x1c0 mm/swap.c:376 folio_mark_accessed+0x11d/0x190 mm/swap.c:496 zap_present_folio_ptes mm/memory.c:1488 [inline] zap_present_ptes mm/memory.c:1563 [inline] zap_pte_range mm/memory.c:1605 [inline] zap_pmd_range mm/memory.c:1722 [inline] zap_pud_range mm/memory.c:1751 [inline] zap_p4d_range mm/memory.c:1772 [inline] unmap_page_range+0xd11/0x22d0 mm/memory.c:1793 unmap_single_vma+0x142/0x1d0 mm/memory.c:1839 unmap_vmas+0x18d/0x2b0 mm/memory.c:1883 exit_mmap+0x1a2/0x6f0 mm/mmap.c:3267 __mmput+0x28/0x1c0 kernel/fork.c:1345 mmput+0x4c/0x60 kernel/fork.c:1367 exit_mm+0xe4/0x190 kernel/exit.c:569 do_exit+0x57e/0x1740 kernel/exit.c:865 do_group_exit+0x102/0x150 kernel/exit.c:1027 get_signal+0xf2f/0x1080 kernel/signal.c:2911 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x59/0x130 kernel/entry/common.c:218 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x00000029 -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 8950 Comm: syz-executor.3 Not tainted 6.9.0-rc4-syzkaller-00031-g96fca68c4fbf #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================