================================================================== BUG: KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush write to 0xffffe8ffffd43080 of 4 bytes by task 6343 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+0x276/0x3f0 mm/swap_state.c:678 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:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2f5/0x6d0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 __get_user_8+0x11/0x20 arch/x86/lib/getuser.S:85 fetch_robust_entry kernel/futex/core.c:783 [inline] exit_robust_list+0x31/0x280 kernel/futex/core.c:811 futex_cleanup kernel/futex/core.c:1043 [inline] futex_exit_release+0xe3/0x130 kernel/futex/core.c:1144 exit_mm_release+0x1a/0x30 kernel/fork.c:1653 exit_mm+0x38/0x190 kernel/exit.c:542 do_exit+0x57e/0x1740 kernel/exit.c:865 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] irqentry_exit_to_user_mode+0x94/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 0xffffe8ffffd43080 of 4 bytes by task 6344 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: 0x0000002a -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 6344 Comm: syz-executor.2 Not tainted 6.9.0-rc6-syzkaller-00131-gf03359bca01b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================