syzbot


KCSAN: data-race in folios_put_refs / need_mlock_drain (4)

Status: moderation: reported on 2026/05/03 02:22
Subsystems: mm
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+5ff4a12779d5bcd990f7@syzkaller.appspotmail.com
First crash: 47d, last: 4d20h
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
e5419c01-9a2e-459f-96f4-979b1e4ccec7 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ KCSAN: data-race in folios_put_refs / need_mlock_drain (4) 2026/05/23 15:14 2026/05/23 15:14 2026/05/23 15:56 c69befb30ac10e158cc9d1557b508ee3f0eca1de

			
		
8e0f59fc-bb6f-402e-9b47-ceaa1d2754a6 assessment-kcsan Benign: ✅ Confident: ✅ KCSAN: data-race in folios_put_refs / need_mlock_drain (4) 2026/05/03 02:22 2026/05/03 02:22 2026/05/03 02:44 a0d91488fc4a789de6e559c15c02b0633b053c1d

			
		
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in folios_put_refs / need_mlock_drain mm 6 20 641d 731d 0/29 auto-obsoleted due to no activity on 2024/10/20 22:05
upstream KCSAN: data-race in folios_put_refs / need_mlock_drain (3) mm 6 4 159d 194d 0/29 auto-obsoleted due to no activity on 2026/03/07 21:34
upstream KCSAN: data-race in folios_put_refs / need_mlock_drain (2) mm 6 24 257d 592d 0/29 auto-obsoleted due to no activity on 2025/11/30 16:35

Sample crash report:
EXT4-fs (loop7): unmounting filesystem 00000000-0000-0000-0000-000000000000.
==================================================================
BUG: KCSAN: data-race in folios_put_refs / need_mlock_drain

write to 0xffff888237c27248 of 1 bytes by task 7011 on cpu 0:
 folio_batch_reinit include/linux/folio_batch.h:50 [inline]
 folios_put_refs+0x28f/0x2d0 mm/swap.c:1002
 folios_put include/linux/mm.h:2149 [inline]
 mlock_folio_batch+0x1beb/0x1c20 mm/mlock.c:209
 mlock_drain_local+0x4d/0xa0 mm/mlock.c:219
 lru_add_drain+0x55/0x70 mm/swap.c:745
 populate_vma_page_range mm/gup.c:1862 [inline]
 __mm_populate+0x24a/0x390 mm/gup.c:1963
 do_mlock+0x44d/0x510 mm/mlock.c:659
 __do_sys_mlock mm/mlock.c:667 [inline]
 __se_sys_mlock mm/mlock.c:665 [inline]
 __x64_sys_mlock+0x36/0x50 mm/mlock.c:665
 x64_sys_call+0x1ab3/0x3020 arch/x86/include/generated/asm/syscalls_64.h:150
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x136/0x3c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237c27248 of 1 bytes by task 6391 on cpu 1:
 folio_batch_count include/linux/folio_batch.h:56 [inline]
 need_mlock_drain+0x30/0x50 mm/mlock.c:235
 cpu_needs_drain mm/swap.c:792 [inline]
 __lru_add_drain_all+0x273/0x450 mm/swap.c:883
 lru_add_drain_all+0x10/0x20 mm/swap.c:899
 invalidate_bdev+0x47/0x70 block/bdev.c:101
 ext4_put_super+0x614/0x7c0 fs/ext4/super.c:1355
 generic_shutdown_super+0xee/0x220 fs/super.c:646
 kill_block_super+0x2a/0x70 fs/super.c:1725
 ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7492
 deactivate_locked_super+0x75/0x1c0 fs/super.c:476
 deactivate_super+0x97/0xa0 fs/super.c:509
 cleanup_mnt+0x2c3/0x340 fs/namespace.c:1312
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1319
 task_work_run+0x130/0x1a0 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
 exit_to_user_mode_loop+0x209/0x870 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
 do_syscall_64+0x23c/0x3c0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 6391 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/14 20:50 upstream 8cd9520d35a6 1d2f3589 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in folios_put_refs / need_mlock_drain
2026/05/03 02:22 upstream 66edb901bf87 a0d91488 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in folios_put_refs / need_mlock_drain
* Struck through repros no longer work on HEAD.