================================================================== BUG: KCSAN: data-race in mlock_folio_batch / need_mlock_drain write to 0xffff888237d29e38 of 1 bytes by task 10664 on cpu 1: folio_batch_reinit include/linux/pagevec.h:100 [inline] mlock_folio_batch+0x197d/0x19a0 mm/mlock.c:210 mlock_folio+0x1d7/0x220 mm/mlock.c:260 mlock_vma_folio mm/internal.h:551 [inline] page_add_file_rmap+0x193/0x240 mm/rmap.c:1356 do_set_pte+0x23c/0x4f0 mm/memory.c:4285 filemap_map_pages+0x4ae/0x830 mm/filemap.c:3537 do_fault_around mm/memory.c:4461 [inline] do_read_fault mm/memory.c:4487 [inline] do_fault mm/memory.c:4621 [inline] handle_pte_fault mm/memory.c:4909 [inline] __handle_mm_fault mm/memory.c:5051 [inline] handle_mm_fault+0xfc3/0x21d0 mm/memory.c:5197 faultin_page mm/gup.c:925 [inline] __get_user_pages+0x363/0xc30 mm/gup.c:1147 populate_vma_page_range mm/gup.c:1543 [inline] __mm_populate+0x23a/0x360 mm/gup.c:1652 mm_populate include/linux/mm.h:3026 [inline] vm_mmap_pgoff+0x174/0x210 mm/util.c:547 ksys_mmap_pgoff+0x2ac/0x320 mm/mmap.c:1410 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888237d29e38 of 1 bytes by task 10667 on cpu 0: folio_batch_count include/linux/pagevec.h:105 [inline] need_mlock_drain+0x30/0x50 mm/mlock.c:236 cpu_needs_drain mm/swap.c:801 [inline] __lru_add_drain_all+0x240/0x420 mm/swap.c:889 lru_cache_disable+0x1f/0x20 mm/swap.c:942 do_mbind mm/mempolicy.c:1307 [inline] kernel_mbind mm/mempolicy.c:1485 [inline] __do_sys_mbind mm/mempolicy.c:1559 [inline] __se_sys_mbind+0x465/0x990 mm/mempolicy.c:1555 __x64_sys_mbind+0x78/0x90 mm/mempolicy.c:1555 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x01 -> 0x00 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 10667 Comm: syz-executor.3 Not tainted 6.3.0-rc2-syzkaller-00050-g9c1bec9c0b08 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 ==================================================================