[moderation] [mm?] KCSAN: data-race in munlock_folio / need_mlock_drain (8)

1 view
Skip to first unread message

syzbot

unread,
Feb 20, 2026, 9:12:30 PM (2 days ago) Feb 20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a95f71ad3e2e Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16bd795a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=70c3ed59b49365c3
dashboard link: https://syzkaller.appspot.com/bug?extid=33db640519d6c4bdeebc
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
CC: [Liam.H...@oracle.com ak...@linux-foundation.org ja...@google.com linux-...@vger.kernel.org linu...@kvack.org lorenzo...@oracle.com pfal...@suse.de vba...@suse.cz]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/59161fbffbab/disk-a95f71ad.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1a0e7d4c6e66/vmlinux-a95f71ad.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e5755f320cce/bzImage-a95f71ad.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+33db64...@syzkaller.appspotmail.com

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

read-write to 0xffff888237d27210 of 1 bytes by task 8974 on cpu 1:
folio_batch_add include/linux/pagevec.h:77 [inline]
munlock_folio+0x44/0x120 mm/mlock.c:301
munlock_vma_folio mm/internal.h:1140 [inline]
__folio_remove_rmap mm/rmap.c:1870 [inline]
folio_remove_rmap_ptes+0x197/0x1a0 mm/rmap.c:1887
zap_present_folio_ptes mm/memory.c:1667 [inline]
zap_present_ptes mm/memory.c:1725 [inline]
do_zap_pte_range mm/memory.c:1827 [inline]
zap_pte_range mm/memory.c:1929 [inline]
zap_pmd_range mm/memory.c:2021 [inline]
zap_pud_range mm/memory.c:2049 [inline]
zap_p4d_range mm/memory.c:2070 [inline]
unmap_page_range+0x1752/0x2e80 mm/memory.c:2091
unmap_single_vma mm/memory.c:2133 [inline]
unmap_vmas+0x2ba/0x420 mm/memory.c:2171
exit_mmap+0x1ab/0x620 mm/mmap.c:1302
__mmput+0x28/0x1c0 kernel/fork.c:1174
mmput+0x40/0x50 kernel/fork.c:1197
exit_mm+0xe3/0x180 kernel/exit.c:581
do_exit+0x3fa/0x15a0 kernel/exit.c:959
do_group_exit+0x138/0x140 kernel/exit.c:1112
__do_sys_exit_group kernel/exit.c:1123 [inline]
__se_sys_exit_group kernel/exit.c:1121 [inline]
__x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1121
x64_sys_call+0x3008/0x3020 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237d27210 of 1 bytes by task 7352 on cpu 0:
folio_batch_count include/linux/pagevec.h:56 [inline]
need_mlock_drain+0x30/0x50 mm/mlock.c:235
cpu_needs_drain mm/swap.c:786 [inline]
__lru_add_drain_all+0x273/0x450 mm/swap.c:877
lru_add_drain_all+0x10/0x20 mm/swap.c:893
invalidate_bdev+0x47/0x70 block/bdev.c:101
ext4_put_super+0x624/0x7d0 fs/ext4/super.c:1353
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:7461
deactivate_locked_super+0x75/0x1c0 fs/super.c:476
deactivate_super+0x97/0xa0 fs/super.c:509
cleanup_mnt+0x2bb/0x330 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+0x1f4/0x6f0 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
do_syscall_64+0x249/0x370 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x14 -> 0x1f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 7352 Comm: syz-executor Tainted: G W syzkaller #0 PREEMPT(full)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages