================================================================== BUG: KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush read-write to 0xffffe8ffffd433c0 of 4 bytes by task 10407 on cpu 1: memcg_rstat_updated mm/memcontrol.c:725 [inline] __mod_memcg_lruvec_state+0x13a/0x1a0 mm/memcontrol.c:875 __mod_lruvec_state+0x3c/0x50 mm/memcontrol.c:897 __update_lru_size include/linux/mm_inline.h:47 [inline] update_lru_size include/linux/mm_inline.h:56 [inline] lruvec_del_folio include/linux/mm_inline.h:356 [inline] folio_activate_fn+0x276/0x5e0 mm/swap.c:347 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+0xcdd/0x22a0 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:3269 __mmput+0x28/0x1c0 kernel/fork.c:1346 mmput+0x4c/0x60 kernel/fork.c:1368 exit_mm+0xe4/0x190 kernel/exit.c:569 do_exit+0x57e/0x1740 kernel/exit.c:865 do_group_exit+0x142/0x150 kernel/exit.c:1027 __do_sys_exit_group kernel/exit.c:1038 [inline] __se_sys_exit_group kernel/exit.c:1036 [inline] __x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1036 x64_sys_call+0x27c1/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f write to 0xffffe8ffffd433c0 of 4 bytes by task 28 on cpu 0: mem_cgroup_css_rstat_flush+0x4ea/0x540 mm/memcontrol.c:5848 cgroup_rstat_flush_locked+0x93a/0xe20 kernel/cgroup/rstat.c:322 cgroup_rstat_flush+0x2a/0x120 kernel/cgroup/rstat.c:354 do_flush_stats mm/memcontrol.c:745 [inline] flush_memcg_stats_dwork+0x50/0x90 mm/memcontrol.c:782 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312 worker_thread+0x526/0x730 kernel/workqueue.c:3393 kthread+0x1d1/0x210 kernel/kthread.c:389 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 value changed: 0x0000000b -> 0x0000003e Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 28 Comm: kworker/u8:1 Not tainted 6.9.0-syzkaller-08414-g7ee332c9f12b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Workqueue: events_unbound flush_memcg_stats_dwork ==================================================================