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

4 views
Skip to first unread message

syzbot

unread,
Jul 12, 2025, 9:25:33 AM7/12/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 379f604cc3dc Merge tag 'pci-v6.16-fixes-3' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16908e8c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a2f5ccd29a82f8aa
dashboard link: https://syzkaller.appspot.com/bug?extid=1b2b913aa57b1c233c99
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
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/27263ef4b12c/disk-379f604c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/09ae95440294/vmlinux-379f604c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6ccdfad67a30/bzImage-379f604c.xz

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

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

read-write to 0xffff888237d26a10 of 1 bytes by task 7398 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:1023 [inline]
__folio_remove_rmap mm/rmap.c:1787 [inline]
folio_remove_rmap_ptes+0x197/0x1a0 mm/rmap.c:1804
zap_present_folio_ptes mm/memory.c:1529 [inline]
zap_present_ptes mm/memory.c:1590 [inline]
do_zap_pte_range mm/memory.c:1691 [inline]
zap_pte_range mm/memory.c:1735 [inline]
zap_pmd_range mm/memory.c:1827 [inline]
zap_pud_range mm/memory.c:1856 [inline]
zap_p4d_range mm/memory.c:1877 [inline]
unmap_page_range+0x14f6/0x2740 mm/memory.c:1898
unmap_single_vma mm/memory.c:1941 [inline]
unmap_vmas+0x23d/0x3a0 mm/memory.c:1985
exit_mmap+0x1b0/0x6c0 mm/mmap.c:1284
__mmput+0x28/0x1c0 kernel/fork.c:1121
mmput+0x40/0x50 kernel/fork.c:1144
exit_mm+0xe4/0x190 kernel/exit.c:581
do_exit+0x417/0x1590 kernel/exit.c:952
do_group_exit+0xff/0x140 kernel/exit.c:1105
get_signal+0xe59/0xf70 kernel/signal.c:3034
arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x7a/0x100 kernel/entry/common.c:111
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237d26a10 of 1 bytes by task 3305 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:779 [inline]
__lru_add_drain_all+0x220/0x3f0 mm/swap.c:867
lru_add_drain_all+0x10/0x20 mm/swap.c:883
invalidate_bdev+0x47/0x70 block/bdev.c:101
ext4_put_super+0x624/0x7d0 fs/ext4/super.c:1339
generic_shutdown_super+0xe6/0x210 fs/super.c:643
kill_block_super+0x2a/0x70 fs/super.c:1755
ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7391
deactivate_locked_super+0x72/0x1c0 fs/super.c:474
deactivate_super+0x97/0xa0 fs/super.c:507
cleanup_mnt+0x269/0x2e0 fs/namespace.c:1417
__cleanup_mnt+0x19/0x20 fs/namespace.c:1424
task_work_run+0x131/0x1a0 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xe4/0x100 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x18 -> 0x1f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3305 Comm: syz-executor Tainted: G W 6.16.0-rc5-syzkaller-00224-g379f604cc3dc #0 PREEMPT(voluntary)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.


---
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

syzbot

unread,
Feb 3, 2026, 2:01:27 AMFeb 3
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages