================================================================== BUG: KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush write to 0xffffe8ffffd5a000 of 4 bytes by task 16509 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] 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+0x380/0x3f0 mm/swap_state.c:697 swapin_readahead+0xe2/0x7a0 mm/swap_state.c:904 do_swap_page+0x3bb/0x15f0 mm/memory.c:4048 handle_pte_fault mm/memory.c:5303 [inline] __handle_mm_fault mm/memory.c:5441 [inline] handle_mm_fault+0x7fa/0x27e0 mm/memory.c:5606 do_user_addr_fault arch/x86/mm/fault.c:1382 [inline] handle_page_fault arch/x86/mm/fault.c:1474 [inline] exc_page_fault+0x2f5/0x690 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 __get_user_8+0x11/0x20 arch/x86/lib/getuser.S:85 rseq_get_rseq_cs kernel/rseq.c:161 [inline] rseq_ip_fixup kernel/rseq.c:281 [inline] __rseq_handle_notify_resume+0xc8/0xc00 kernel/rseq.c:329 rseq_handle_notify_resume include/linux/rseq.h:38 [inline] resume_user_mode_work include/linux/resume_user_mode.h:62 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0xcb/0x130 kernel/entry/common.c:231 irqentry_exit+0x12/0x50 kernel/entry/common.c:334 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 read-write to 0xffffe8ffffd5a000 of 4 bytes by task 16510 on cpu 1: memcg_rstat_updated mm/memcontrol.c:725 [inline] __mod_memcg_state+0x10c/0x170 mm/memcontrol.c:824 mod_memcg_state include/linux/memcontrol.h:1002 [inline] mod_memcg_page_state include/linux/memcontrol.h:1017 [inline] __vmalloc_area_node mm/vmalloc.c:3645 [inline] __vmalloc_node_range+0xa98/0xee0 mm/vmalloc.c:3818 __bpf_map_area_alloc kernel/bpf/syscall.c:307 [inline] bpf_map_area_alloc+0xd8/0x110 kernel/bpf/syscall.c:314 bloom_map_alloc+0x1ae/0x2b0 kernel/bpf/bloom_filter.c:146 map_create+0x83c/0xb90 kernel/bpf/syscall.c:1320 __sys_bpf+0x667/0x7a0 kernel/bpf/syscall.c:5642 __do_sys_bpf kernel/bpf/syscall.c:5767 [inline] __se_sys_bpf kernel/bpf/syscall.c:5765 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5765 x64_sys_call+0x86c/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:322 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: 0x00000016 -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 16510 Comm: syz-executor.2 Not tainted 6.9.0-rc7-syzkaller-00023-g6d7ddd805123 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================