syzbot


possible deadlock in mfill_get_vma

Status: upstream: reported C repro on 2026/03/15 18:37
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+c473aa669b5e8a6f48d2@syzkaller.appspotmail.com
First crash: 5d09h, last: 17m
Discussions (2)
Title Replies (including bot) Last reply
[PATCH next] userfaultfd: unassigned vma leads to a potential unreleased locks 1 (1) 2026/03/16 03:11
[syzbot] [mm?] possible deadlock in mfill_get_vma 4 (9) 2026/03/16 03:07
Last patch testing requests (4)
Created Duration User Patch Repo Result
2026/03/16 02:21 26m eadavis@qq.com patch linux-next OK log
2026/03/16 01:49 17m eadavis@qq.com patch linux-next report log
2026/03/16 01:19 34m hdanton@sina.com patch linux-next OK log
2026/03/16 00:57 26m eadavis@qq.com patch linux-next report log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.17/5990 is trying to acquire lock:
ffff88802caef3b8 (&mm->mmap_lock){++++}-{4:4}, at: __might_fault+0xaf/0x130 mm/memory.c:7249

but task is already holding lock:
ffff88807cdbccf0 (&ctx->map_changing_lock){.+.+}-{4:4}, at: mfill_get_vma+0x162/0x660 mm/userfaultfd.c:226

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&ctx->map_changing_lock){.+.+}-{4:4}:
       down_read+0x47/0x2e0 kernel/locking/rwsem.c:1568
       mfill_get_vma+0x162/0x660 mm/userfaultfd.c:226
       mfill_atomic mm/userfaultfd.c:900 [inline]
       mfill_atomic_continue+0x189/0x12c0 mm/userfaultfd.c:974
       userfaultfd_continue fs/userfaultfd.c:1806 [inline]
       userfaultfd_ioctl+0x232d/0x4c70 fs/userfaultfd.c:2071
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (vm_lock){++++}-{0:0}:
       __vma_start_exclude_readers+0x28a/0x940 mm/mmap_lock.c:125
       __vma_start_write+0xdc/0x290 mm/mmap_lock.c:148
       vma_start_write include/linux/mmap_lock.h:303 [inline]
       mprotect_fixup+0x5eb/0xa80 mm/mprotect.c:768
       setup_arg_pages+0x565/0xac0 fs/exec.c:670
       load_elf_binary+0xc5e/0x2980 fs/binfmt_elf.c:1029
       search_binary_handler fs/exec.c:1664 [inline]
       exec_binprm fs/exec.c:1696 [inline]
       bprm_execve+0x949/0x1470 fs/exec.c:1748
       kernel_execve+0x844/0x930 fs/exec.c:1892
       try_to_run_init_process+0x13/0x60 init/main.c:1514
       kernel_init+0xad/0x1d0 init/main.c:1642
       ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

-> #0 (&mm->mmap_lock){++++}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3165 [inline]
       check_prevs_add kernel/locking/lockdep.c:3284 [inline]
       validate_chain kernel/locking/lockdep.c:3908 [inline]
       __lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
       lock_acquire+0xf0/0x2e0 kernel/locking/lockdep.c:5868
       __might_fault+0xcb/0x130 mm/memory.c:7249
       userfaultfd_continue fs/userfaultfd.c:1813 [inline]
       userfaultfd_ioctl+0x2372/0x4c70 fs/userfaultfd.c:2071
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &mm->mmap_lock --> vm_lock --> &ctx->map_changing_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(&ctx->map_changing_lock);
                               lock(vm_lock);
                               lock(&ctx->map_changing_lock);
  rlock(&mm->mmap_lock);

 *** DEADLOCK ***

2 locks held by syz.0.17/5990:
 #0: ffff88807c119d08 (vm_lock){++++}-{0:0}, at: lock_vma_under_rcu+0x1d1/0x500 mm/mmap_lock.c:310
 #1: ffff88807cdbccf0 (&ctx->map_changing_lock){.+.+}-{4:4}, at: mfill_get_vma+0x162/0x660 mm/userfaultfd.c:226

stack backtrace:
CPU: 0 UID: 0 PID: 5990 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain kernel/locking/lockdep.c:3908 [inline]
 __lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0xf0/0x2e0 kernel/locking/lockdep.c:5868
 __might_fault+0xcb/0x130 mm/memory.c:7249
 userfaultfd_continue fs/userfaultfd.c:1813 [inline]
 userfaultfd_ioctl+0x2372/0x4c70 fs/userfaultfd.c:2071
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f478759c799
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcc2bbac28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f4787815fa0 RCX: 00007f478759c799
RDX: 0000200000000080 RSI: 00000000c020aa07 RDI: 0000000000000003
RBP: 00007f4787632c99 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4787815fac R14: 00007f4787815fa0 R15: 00007f4787815fa0
 </TASK>

Crashes (203):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/15 01:11 linux-next b84a0ebe421c ee8d34d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 23:20 linux-next b84a0ebe421c ee8d34d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 21:54 linux-next b84a0ebe421c ee8d34d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 20:12 linux-next b84a0ebe421c ee8d34d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 18:43 linux-next b84a0ebe421c ee8d34d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 16:42 linux-next b84a0ebe421c ee8d34d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 14:48 linux-next b84a0ebe421c ee8d34d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/11 21:25 linux-next f90aadf1c67c 2d88ab01 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/11 20:25 linux-next f90aadf1c67c 2d88ab01 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 04:07 linux-next 95c541ddfb08 0737c18f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 04:07 linux-next 95c541ddfb08 0737c18f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/16 21:30 linux-next 95c541ddfb08 0737c18f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/16 18:28 linux-next b84a0ebe421c 64e21424 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/16 14:54 linux-next b84a0ebe421c 64e21424 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/16 05:50 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/16 04:32 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/16 01:47 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/16 00:42 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 22:51 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 21:22 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 20:33 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 16:50 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 13:25 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 09:42 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 08:21 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in mfill_get_vma
2026/03/15 06:43 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 05:37 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 05:31 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 04:27 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/15 03:08 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in mfill_get_vma
2026/03/15 00:53 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 16:26 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 14:43 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 13:46 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 12:37 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 11:20 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 08:52 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in mfill_get_vma
2026/03/14 07:11 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in mfill_get_vma
2026/03/14 06:29 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 04:45 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/14 03:37 linux-next b84a0ebe421c ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 23:42 linux-next b84a0ebe421c 351cb5cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 21:24 linux-next b84a0ebe421c 351cb5cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 18:01 linux-next b84a0ebe421c 351cb5cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in mfill_get_vma
2026/03/13 18:01 linux-next b84a0ebe421c 351cb5cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in mfill_get_vma
2026/03/13 13:07 linux-next 5c9e55fecf93 2f7f359d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 11:36 linux-next 5c9e55fecf93 2f7f359d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 10:31 linux-next 5c9e55fecf93 2f7f359d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 09:24 linux-next 5c9e55fecf93 2f7f359d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 07:28 linux-next 5c9e55fecf93 2f7f359d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 04:35 linux-next 5c9e55fecf93 2f7f359d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/13 03:02 linux-next 5c9e55fecf93 2f7f359d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
* Struck through repros no longer work on HEAD.