============================================ WARNING: possible recursive locking detected 6.13.0-rc3-next-20241218-syzkaller #0 Not tainted -------------------------------------------- syz.1.221/6840 is trying to acquire lock: ffff88807cf3fc08 (vm_lock){++++}-{0:0}, at: uffd_move_lock mm/userfaultfd.c:1477 [inline] ffff88807cf3fc08 (vm_lock){++++}-{0:0}, at: move_pages+0x26b/0x1680 mm/userfaultfd.c:1632 but task is already holding lock: ffff888064ab10c8 (vm_lock){++++}-{0:0}, at: vma_start_read_locked include/linux/mm.h:803 [inline] ffff888064ab10c8 (vm_lock){++++}-{0:0}, at: uffd_lock_vma+0x20c/0x2c0 mm/userfaultfd.c:88 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(vm_lock); lock(vm_lock); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz.1.221/6840: #0: ffff888064ab10c8 (vm_lock){++++}-{0:0}, at: vma_start_read_locked include/linux/mm.h:803 [inline] #0: ffff888064ab10c8 (vm_lock){++++}-{0:0}, at: uffd_lock_vma+0x20c/0x2c0 mm/userfaultfd.c:88 #1: ffffffff8e937d20 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #1: ffffffff8e937d20 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8e937d20 (rcu_read_lock){....}-{1:3}, at: lock_vma_under_rcu+0x1dd/0xa40 mm/memory.c:6422 stack backtrace: CPU: 1 UID: 0 PID: 6840 Comm: syz.1.221 Not tainted 6.13.0-rc3-next-20241218-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 vma_start_read include/linux/mm.h:744 [inline] lock_vma_under_rcu+0x370/0xa40 mm/memory.c:6427 uffd_move_lock mm/userfaultfd.c:1477 [inline] move_pages+0x26b/0x1680 mm/userfaultfd.c:1632 userfaultfd_move fs/userfaultfd.c:1899 [inline] userfaultfd_ioctl+0x5221/0x6840 fs/userfaultfd.c:2022 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4878385d29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4879140038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f4878575fa0 RCX: 00007f4878385d29 RDX: 0000000020000080 RSI: 00000000c028aa05 RDI: 0000000000000003 RBP: 00007f4878401a20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4878575fa0 R15: 00007ffe767823d8