================================================================== BUG: KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush write to 0xffff888237c344c0 of 4 bytes by task 3352 on cpu 1: 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:3267 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3348 worker_thread+0x526/0x730 kernel/workqueue.c:3429 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 0xffff888237c344c0 of 4 bytes by task 9592 on cpu 0: 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] __page_cache_release+0x2fa/0x4a0 mm/swap.c:82 folios_put_refs+0x15e/0x2b0 mm/swap.c:1019 folios_put include/linux/mm.h:1567 [inline] __folio_batch_release+0xa4/0xc0 mm/swap.c:1094 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x348/0xa50 mm/shmem.c:1005 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x14d/0x530 mm/shmem.c:1242 evict+0x1ae/0x420 fs/inode.c:667 iput_final fs/inode.c:1741 [inline] iput+0x432/0x5c0 fs/inode.c:1767 dentry_unlink_inode+0x230/0x240 fs/dcache.c:400 __dentry_kill+0x188/0x4b0 fs/dcache.c:603 dput+0x5c/0xd0 fs/dcache.c:845 __fput+0x44c/0x660 fs/file_table.c:430 ____fput+0x15/0x20 fs/file_table.c:450 task_work_run+0x13a/0x1a0 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x5fd/0x1740 kernel/exit.c:878 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: 0x0000003a -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 9592 Comm: syz-executor.4 Not tainted 6.9.0-rc7-syzkaller-00012-gdccb07f2914c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================