BUG: KCSAN: data-race in mlock_new_folio / need_mlock_drain read-write to 0xffff888237c2b370 of 1 bytes by task 4736 on cpu 0: folio_batch_add include/linux/pagevec.h:77 [inline] mlock_new_folio+0x114/0x200 mm/mlock.c:280 folio_add_lru_vma+0x5d/0x60 mm/swap.c:544 do_anonymous_page mm/memory.c:4604 [inline] do_pte_missing mm/memory.c:3945 [inline] handle_pte_fault mm/memory.c:5521 [inline] __handle_mm_fault mm/memory.c:5664 [inline] handle_mm_fault+0x2372/0x2940 mm/memory.c:5832 faultin_page mm/gup.c:1194 [inline] __get_user_pages+0x499/0x10d0 mm/gup.c:1493 populate_vma_page_range mm/gup.c:1932 [inline] __mm_populate+0x25b/0x3b0 mm/gup.c:2035 do_mlock+0x401/0x4f0 mm/mlock.c:653 __do_sys_mlock mm/mlock.c:661 [inline] __se_sys_mlock mm/mlock.c:659 [inline] __x64_sys_mlock+0x36/0x40 mm/mlock.c:659 x64_sys_call+0x822/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:150 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff888237c2b370 of 1 bytes by task 4730 on cpu 1: folio_batch_count include/linux/pagevec.h:56 [inline] need_mlock_drain+0x30/0x50 mm/mlock.c:235 cpu_needs_drain mm/swap.c:824 [inline] __lru_add_drain_all+0x235/0x410 mm/swap.c:912 lru_add_drain_all+0x10/0x20 mm/swap.c:928 memfd_wait_for_pins mm/memfd.c:132 [inline] memfd_add_seals mm/memfd.c:252 [inline] memfd_fcntl+0x7ac/0xc20 mm/memfd.c:286 do_fcntl+0x484/0xe20 fs/fcntl.c:449 __do_sys_fcntl fs/fcntl.c:492 [inline] __se_sys_fcntl+0xc4/0x190 fs/fcntl.c:477 __x64_sys_fcntl+0x43/0x50 fs/fcntl.c:477 x64_sys_call+0x209e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:73 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x04 -> 0x09 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 4730 Comm: syz.0.467 Not tainted 6.11.0-rc5-syzkaller-00057-g86987d84b968 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 ==================================================================