================================================================== BUG: KCSAN: data-race in do_try_to_free_pages / shrink_node write to 0xffff88811bde7070 of 8 bytes by task 15438 on cpu 0: snapshot_refaults mm/vmscan.c:6164 [inline] do_try_to_free_pages+0x95f/0xce0 mm/vmscan.c:6226 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6518 try_charge_memcg+0x280/0xd20 mm/memcontrol.c:2762 try_charge mm/memcontrol.c:2904 [inline] charge_memcg mm/memcontrol.c:7241 [inline] mem_cgroup_swapin_charge_folio+0x107/0x190 mm/memcontrol.c:7326 __read_swap_cache_async+0x2b9/0x510 mm/swap_state.c:498 swap_cluster_readahead+0x276/0x3f0 mm/swap_state.c:662 swapin_readahead+0xe2/0x7a0 mm/swap_state.c:886 do_swap_page+0x44c/0x1570 mm/memory.c:3898 handle_pte_fault mm/memory.c:5147 [inline] __handle_mm_fault mm/memory.c:5285 [inline] handle_mm_fault+0x7f6/0x27b0 mm/memory.c:5450 do_user_addr_fault arch/x86/mm/fault.c:1415 [inline] handle_page_fault arch/x86/mm/fault.c:1507 [inline] exc_page_fault+0x2f7/0x6d0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 __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+0xc7/0xbf0 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:108 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x8e/0x130 kernel/entry/common.c:212 do_syscall_64+0x65/0x120 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff88811bde7070 of 8 bytes by task 6289 on cpu 1: prepare_scan_control mm/vmscan.c:2250 [inline] shrink_node+0x3c3/0x15d0 mm/vmscan.c:5900 shrink_zones mm/vmscan.c:6141 [inline] do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6203 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6518 try_charge_memcg+0x280/0xd20 mm/memcontrol.c:2762 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3275 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3301 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline] bpf_ringbuf_alloc+0xba/0x2f0 kernel/bpf/ringbuf.c:170 ringbuf_map_alloc+0x167/0x1d0 kernel/bpf/ringbuf.c:204 map_create+0x713/0xa40 kernel/bpf/syscall.c:1237 __sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5439 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline] __se_sys_bpf kernel/bpf/syscall.c:5559 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5559 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x0000000000000007 -> 0x0000000000000008 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 6289 Comm: syz-executor.3 Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 ==================================================================