Memory cgroup out of memory: Killed process 13515 (syz-executor.2) total-vm:51464kB, anon-rss:512kB, file-rss:12032kB, shmem-rss:0kB, UID:0 pgtables:84kB oom_score_adj:1000 ================================================================== BUG: KCSAN: data-race in __count_memcg_events / mem_cgroup_css_rstat_flush write to 0xffffe8ffffc43500 of 4 bytes by task 22557 on cpu 1: 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] mem_cgroup_flush_stats+0xb2/0xc0 mm/memcontrol.c:766 prepare_scan_control mm/vmscan.c:2234 [inline] shrink_node+0x2f2/0x15a0 mm/vmscan.c:5906 shrink_zones mm/vmscan.c:6152 [inline] do_try_to_free_pages+0x3cc/0xca0 mm/vmscan.c:6214 try_to_free_mem_cgroup_pages+0x1eb/0x4e0 mm/vmscan.c:6529 try_charge_memcg+0x279/0xd10 mm/memcontrol.c:2783 try_charge mm/memcontrol.c:2931 [inline] charge_memcg mm/memcontrol.c:7284 [inline] mem_cgroup_swapin_charge_folio+0x107/0x1a0 mm/memcontrol.c:7369 __read_swap_cache_async+0x2b9/0x520 mm/swap_state.c:514 swap_cluster_readahead+0x276/0x3f0 mm/swap_state.c:678 swapin_readahead+0xe2/0x7a0 mm/swap_state.c:904 do_swap_page+0x3bb/0x15f0 mm/memory.c:4043 handle_pte_fault mm/memory.c:5298 [inline] __handle_mm_fault mm/memory.c:5436 [inline] handle_mm_fault+0x7fa/0x27e0 mm/memory.c:5601 do_user_addr_fault arch/x86/mm/fault.c:1332 [inline] handle_page_fault arch/x86/mm/fault.c:1475 [inline] exc_page_fault+0x3eb/0x690 arch/x86/mm/fault.c:1533 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 read-write to 0xffffe8ffffc43500 of 4 bytes by task 25600 on cpu 0: memcg_rstat_updated mm/memcontrol.c:725 [inline] __count_memcg_events+0xce/0x130 mm/memcontrol.c:962 count_memcg_events include/linux/memcontrol.h:1096 [inline] count_memcg_folio_events include/linux/memcontrol.h:1106 [inline] shrink_folio_list+0xc72/0x2460 mm/vmscan.c:1451 shrink_inactive_list mm/vmscan.c:1926 [inline] shrink_list mm/vmscan.c:2163 [inline] shrink_lruvec+0xbbc/0x1640 mm/vmscan.c:5687 shrink_node_memcgs mm/vmscan.c:5873 [inline] shrink_node+0xa78/0x15a0 mm/vmscan.c:5908 shrink_zones mm/vmscan.c:6152 [inline] do_try_to_free_pages+0x3cc/0xca0 mm/vmscan.c:6214 try_to_free_mem_cgroup_pages+0x1eb/0x4e0 mm/vmscan.c:6529 try_charge_memcg+0x279/0xd10 mm/memcontrol.c:2783 try_charge mm/memcontrol.c:2931 [inline] charge_memcg mm/memcontrol.c:7284 [inline] mem_cgroup_swapin_charge_folio+0x107/0x1a0 mm/memcontrol.c:7369 __read_swap_cache_async+0x2b9/0x520 mm/swap_state.c:514 swap_cluster_readahead+0x276/0x3f0 mm/swap_state.c:678 shmem_swapin_cluster mm/shmem.c:1576 [inline] shmem_swapin_folio+0x246/0x740 mm/shmem.c:1885 shmem_get_folio_gfp+0x278/0xb70 mm/shmem.c:1991 shmem_fault+0x100/0x260 mm/shmem.c:2255 __do_fault+0xb6/0x200 mm/memory.c:4526 do_shared_fault mm/memory.c:4949 [inline] do_fault mm/memory.c:5023 [inline] do_pte_missing mm/memory.c:3875 [inline] handle_pte_fault mm/memory.c:5295 [inline] __handle_mm_fault mm/memory.c:5436 [inline] handle_mm_fault+0xb9e/0x27e0 mm/memory.c:5601 do_user_addr_fault arch/x86/mm/fault.c:1332 [inline] handle_page_fault arch/x86/mm/fault.c:1475 [inline] exc_page_fault+0x3eb/0x690 arch/x86/mm/fault.c:1533 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 value changed: 0x00000001 -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 25600 Comm: syz-executor.2 Tainted: G W 6.9.0-syzkaller-08284-gea5f6ad9ad96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 ==================================================================