============================================ WARNING: possible recursive locking detected 6.13.0-rc1-syzkaller #0 Not tainted -------------------------------------------- syz.2.16/4389 is trying to acquire lock: ffff888177d8c8c8 (vm_lock){++++}-{0:0}, at: uffd_move_lock mm/userfaultfd.c:1477 [inline] ffff888177d8c8c8 (vm_lock){++++}-{0:0}, at: move_pages+0xaa/0x780 mm/userfaultfd.c:1632 but task is already holding lock: ffff888115dcc2c8 (vm_lock){++++}-{0:0}, at: uffd_move_lock mm/userfaultfd.c:1451 [inline] ffff888115dcc2c8 (vm_lock){++++}-{0:0}, at: move_pages+0x6c/0x780 mm/userfaultfd.c:1632 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.2.16/4389: #0: ffff888115dcc2c8 (vm_lock){++++}-{0:0}, at: uffd_move_lock mm/userfaultfd.c:1451 [inline] #0: ffff888115dcc2c8 (vm_lock){++++}-{0:0}, at: move_pages+0x6c/0x780 mm/userfaultfd.c:1632 #1: ffffffff841f2458 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #1: ffffffff841f2458 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff841f2458 (rcu_read_lock){....}-{1:3}, at: lock_vma_under_rcu+0x80/0x300 mm/memory.c:6378 stack backtrace: CPU: 1 UID: 0 PID: 4389 Comm: syz.2.16 Not tainted 6.13.0-rc1-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+0xa3/0x100 lib/dump_stack.c:120 print_deadlock_bug+0x244/0x260 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain kernel/locking/lockdep.c:3891 [inline] __lock_acquire+0x10c4/0x2570 kernel/locking/lockdep.c:5226 lock_acquire+0xeb/0x270 kernel/locking/lockdep.c:5849 vma_start_read include/linux/mm.h:744 [inline] lock_vma_under_rcu+0x186/0x300 mm/memory.c:6383 uffd_move_lock mm/userfaultfd.c:1477 [inline] move_pages+0xaa/0x780 mm/userfaultfd.c:1632 userfaultfd_move fs/userfaultfd.c:1899 [inline] userfaultfd_ioctl+0x32a/0x2430 fs/userfaultfd.c:2022 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0x68/0xb0 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x1b0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd7b4d85d29 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:00007fd7b5ba6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fd7b4f75fa0 RCX: 00007fd7b4d85d29 RDX: 0000000020000080 RSI: 00000000c028aa05 RDI: 0000000000000003 RBP: 00007fd7b4e01a20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd7b4f75fa0 R15: 00007ffd01ee78c8