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: 42d, last: 33d
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 (14)
Created Duration User Patch Repo Result
2026/04/04 00:41 25m retest repro linux-next OK log
2026/04/03 22:51 34m retest repro linux-next OK log
2026/04/03 22:51 40m retest repro linux-next OK log
2026/04/03 22:51 50m retest repro linux-next OK log
2026/04/03 22:51 54m retest repro linux-next OK log
2026/04/03 22:51 22m retest repro linux-next OK log
2026/04/03 19:22 42m retest repro linux-next OK log
2026/04/03 19:22 2h39m retest repro linux-next OK log
2026/04/03 19:22 2h26m retest repro linux-next OK log
2026/04/03 19:22 26m retest repro linux-next OK log
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.160/6380 is trying to acquire lock:
ffff88807cb5a978 (&mm->mmap_lock){++++}-{4:4}, at: __might_fault+0xaf/0x130 mm/memory.c:7271

but task is already holding lock:
ffff888058c7ca30 (&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:

-> #1 (&ctx->map_changing_lock){++++}-{4:4}:
       down_write+0x96/0x200 kernel/locking/rwsem.c:1625
       userfaultfd_unmap_prep+0x24b/0x3e0 fs/userfaultfd.c:848
       vms_gather_munmap_vmas+0x9c6/0x1370 mm/vma.c:1466
       do_vmi_align_munmap+0x2b4/0x4b0 mm/vma.c:1576
       do_vmi_munmap+0x252/0x2d0 mm/vma.c:1633
       do_munmap+0xf9/0x170 mm/mmap.c:1066
       mremap_to+0x34d/0x850 mm/mremap.c:1448
       do_mremap mm/mremap.c:1999 [inline]
       __do_sys_mremap mm/mremap.c:2055 [inline]
       __se_sys_mremap+0xe6d/0x11d0 mm/mremap.c:2023
       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

-> #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+0x106/0x350 kernel/locking/lockdep.c:5868
       __might_fault+0xcb/0x130 mm/memory.c:7271
       userfaultfd_copy fs/userfaultfd.c:1648 [inline]
       userfaultfd_ioctl+0x2c01/0x4c70 fs/userfaultfd.c:2059
       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:

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

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

stack backtrace:
CPU: 0 UID: 0 PID: 6380 Comm: syz.0.160 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+0x106/0x350 kernel/locking/lockdep.c:5868
 __might_fault+0xcb/0x130 mm/memory.c:7271
 userfaultfd_copy fs/userfaultfd.c:1648 [inline]
 userfaultfd_ioctl+0x2c01/0x4c70 fs/userfaultfd.c:2059
 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:0x7f9d0e99c799
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:00007f9d0f7c6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9d0ec15fa0 RCX: 00007f9d0e99c799
RDX: 0000200000000080 RSI: 00000000c028aa03 RDI: 0000000000000003
RBP: 00007f9d0ea32c99 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9d0ec16038 R14: 00007f9d0ec15fa0 R15: 00007ffe8de829a8
 </TASK>

Crashes (286):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/20 15:58 linux-next b5d083a3ed1e 2f245add .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/20 14:16 linux-next b5d083a3ed1e 2f245add .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/20 14:12 linux-next b5d083a3ed1e 2f245add .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/20 12:37 linux-next b5d083a3ed1e 2f245add .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/20 10:36 linux-next b5d083a3ed1e 2f245add .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/20 09:16 linux-next b5d083a3ed1e 2f245add .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/20 04:32 linux-next 8e42d2514a7e bd6dcb30 .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/20 03:30 linux-next 8e42d2514a7e bd6dcb30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/20 02:08 linux-next 8e42d2514a7e bd6dcb30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/20 01:02 linux-next 8e42d2514a7e bd6dcb30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/19 22:43 linux-next 8e42d2514a7e bd6dcb30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/19 18:56 linux-next 8e42d2514a7e bd6dcb30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/19 15:26 linux-next 8e42d2514a7e bd6dcb30 .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/19 11:40 linux-next 8e42d2514a7e bd6dcb30 .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/19 10:06 linux-next 8e42d2514a7e 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/19 06:05 linux-next 8e42d2514a7e 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/19 01:31 linux-next 8e42d2514a7e 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 23:03 linux-next 8e42d2514a7e 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 19:15 linux-next 8e42d2514a7e 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 17:26 linux-next 8e5a478b6d6a 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 14:25 linux-next 8e5a478b6d6a 0199f9a1 .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/18 11:27 linux-next 8e5a478b6d6a 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 09:33 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 08:25 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 05:15 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 03:48 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/18 01:23 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 23:40 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 22:15 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 22:15 linux-next 8e5a478b6d6a c8810548 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 19:32 linux-next 8e5a478b6d6a c01bca74 .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/17 16:35 linux-next 95c541ddfb08 c01bca74 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 15:19 linux-next 95c541ddfb08 c01bca74 .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/17 11:23 linux-next 95c541ddfb08 c01bca74 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in mfill_get_vma
2026/03/17 10:01 linux-next 95c541ddfb08 c01bca74 .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/17 05:14 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/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/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
* Struck through repros no longer work on HEAD.