================================================================== BUG: KCSAN: data-race in mlock_folio / need_mlock_drain read-write to 0xffff888237c2b5a0 of 1 bytes by task 20827 on cpu 0: folio_batch_add include/linux/pagevec.h:77 [inline] mlock_folio+0x136/0x210 mm/mlock.c:257 mlock_vma_folio mm/internal.h:926 [inline] __folio_add_anon_rmap mm/rmap.c:1349 [inline] folio_add_anon_rmap_ptes+0x219/0x220 mm/rmap.c:1372 remove_migration_pte+0x62e/0x9c0 mm/migrate.c:333 rmap_walk_anon+0x28f/0x440 mm/rmap.c:2635 rmap_walk+0x5b/0x70 mm/rmap.c:2713 remove_migration_ptes mm/migrate.c:373 [inline] migrate_folio_move mm/migrate.c:1388 [inline] migrate_pages_batch+0x1374/0x1910 mm/migrate.c:1898 migrate_pages_sync mm/migrate.c:1964 [inline] migrate_pages+0xff1/0x1820 mm/migrate.c:2073 do_mbind mm/mempolicy.c:1390 [inline] kernel_mbind mm/mempolicy.c:1533 [inline] __do_sys_mbind mm/mempolicy.c:1607 [inline] __se_sys_mbind+0xf76/0x1160 mm/mempolicy.c:1603 __x64_sys_mbind+0x78/0x90 mm/mempolicy.c:1603 x64_sys_call+0x2b4d/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:238 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 0xffff888237c2b5a0 of 1 bytes by task 20831 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:778 [inline] __lru_add_drain_all+0x22a/0x3f0 mm/swap.c:866 lru_cache_disable+0x1f/0x30 mm/swap.c:919 do_mbind mm/mempolicy.c:1307 [inline] kernel_mbind mm/mempolicy.c:1533 [inline] __do_sys_mbind mm/mempolicy.c:1607 [inline] __se_sys_mbind+0x4df/0x1160 mm/mempolicy.c:1603 __x64_sys_mbind+0x78/0x90 mm/mempolicy.c:1603 x64_sys_call+0x2b4d/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:238 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: 0x00 -> 0x01 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 20831 Comm: syz.3.6158 Not tainted 6.12.0-rc7-syzkaller-00189-ge8bdb3c8be08 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 ==================================================================