================================================================== BUG: KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush write to 0xffff888237c344c0 of 4 bytes by task 1450 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: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 0xffff888237c344c0 of 4 bytes by task 12161 on cpu 0: memcg_rstat_updated mm/memcontrol.c:725 [inline] __mod_memcg_lruvec_state+0x13a/0x1a0 mm/memcontrol.c:875 __mod_lruvec_state mm/memcontrol.c:897 [inline] __lruvec_stat_mod_folio+0xce/0x120 mm/memcontrol.c:917 filemap_unaccount_folio+0x14f/0x330 mm/filemap.c:194 __filemap_remove_folio+0x54/0x2c0 mm/filemap.c:231 filemap_remove_folio+0x6c/0x1f0 mm/filemap.c:264 truncate_inode_folio+0x42/0x50 mm/truncate.c:195 shmem_undo_range+0x25e/0xa50 mm/shmem.c:1001 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_sync+0x44/0x60 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close+0x101/0x1b0 fs/open.c:1541 __x64_sys_close+0x1f/0x30 fs/open.c:1541 x64_sys_call+0x25b9/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:4 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 value changed: 0x0000001b -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 12161 Comm: syz-executor.4 Not tainted 6.9.0-rc4-syzkaller-00266-g977b1ef51866 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================