================================================================== BUG: KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush write to 0xffffe8ffffd42c80 of 4 bytes by task 3207 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 0xffffe8ffffd42c80 of 4 bytes by task 10427 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_add_folio include/linux/mm_inline.h:326 [inline] lru_add_fn+0x289/0x430 mm/swap.c:215 folio_batch_move_lru+0x20c/0x2c0 mm/swap.c:233 folio_batch_add_and_move mm/swap.c:249 [inline] folio_add_lru+0xd4/0x130 mm/swap.c:532 shmem_alloc_and_add_folio mm/shmem.c:1722 [inline] shmem_get_folio_gfp+0x7dc/0xb70 mm/shmem.c:2055 shmem_get_folio mm/shmem.c:2160 [inline] shmem_write_begin+0xa0/0x1c0 mm/shmem.c:2744 generic_perform_write+0x1d5/0x410 mm/filemap.c:3974 shmem_file_write_iter+0xc8/0xf0 mm/shmem.c:2920 call_write_iter include/linux/fs.h:2110 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x771/0x8e0 fs/read_write.c:590 ksys_write+0xeb/0x1b0 fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:652 x64_sys_call+0x27b7/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:2 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: 0x0000001e -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 10427 Comm: syz-executor.0 Not tainted 6.9.0-rc5-syzkaller-00296-g5eb4573ea63d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ================================================================== loop0: detected capacity change from 0 to 2048 EXT4-fs error (device loop0): ext4_mb_generate_buddy:1216: group 0, block bitmap and bg descriptor inconsistent: 25 vs 150994969 free clusters EXT4-fs (loop0): Delayed block allocation failed for inode 19 at logical offset 10 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=2415919104 EXT4-fs (loop0): dirty_blocks=32 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=1