============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.5.317/9692 is trying to acquire lock: ffff88805a986c90 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline] ffff88805a986c90 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: mi_read+0x2d4/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff88803d78b6c0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline] ffff88803d78b6c0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_rename+0x6f7/0xbf0 fs/ntfs3/namei.c:328 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock#3/5); lock(&ni->ni_lock#3/5); *** DEADLOCK *** May be due to missing lock nesting notation 9 locks held by syz.5.317/9692: #0: ffff888058c1c480 (sb_writers#16){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:499 #1: ffff888058c1c880 (&type->s_vfs_rename_key#6){+.+.}-{4:4}, at: lock_rename fs/namei.c:3716 [inline] #1: ffff888058c1c880 (&type->s_vfs_rename_key#6){+.+.}-{4:4}, at: __start_renaming+0xed/0x410 fs/namei.c:3808 #2: ffff88803d78a268 (&type->i_mutex_dir_key#10/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1072 [inline] #2: ffff88803d78a268 (&type->i_mutex_dir_key#10/1){+.+.}-{4:4}, at: lock_two_directories+0x1a2/0x220 fs/namei.c:3692 #3: ffff88803d789ab8 (&type->i_mutex_dir_key#10/5){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1072 [inline] #3: ffff88803d789ab8 (&type->i_mutex_dir_key#10/5){+.+.}-{4:4}, at: lock_two_directories+0x1cc/0x220 fs/namei.c:3693 #4: ffff88803d78b978 (&sb->s_type->i_mutex_key#43/4){+.+.}-{4:4}, at: vfs_rename+0x661/0xee0 fs/namei.c:5892 #5: ffff88803d789fb0 (&ni->ni_lock/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1132 [inline] #5: ffff88803d789fb0 (&ni->ni_lock/6){+.+.}-{4:4}, at: ntfs_rename+0x6de/0xbf0 fs/ntfs3/namei.c:327 #6: ffff88803d78b6c0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline] #6: ffff88803d78b6c0 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_rename+0x6f7/0xbf0 fs/ntfs3/namei.c:328 #7: ffff88803d789800 (&ni->ni_lock#3/7){+.+.}-{4:4}, at: ni_lock_dir2 fs/ntfs3/ntfs_fs.h:1137 [inline] #7: ffff88803d789800 (&ni->ni_lock#3/7){+.+.}-{4:4}, at: ntfs_rename+0x712/0xbf0 fs/ntfs3/namei.c:330 #8: ffff888058c1e120 (&wnd->rw_lock/1){+.+.}-{4:4}, at: ntfs_look_free_mft+0x163/0xd50 fs/ntfs3/fsntfs.c:571 stack backtrace: CPU: 0 UID: 0 PID: 9692 Comm: syz.5.317 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041 check_deadlock kernel/locking/lockdep.c:3093 [inline] validate_chain kernel/locking/lockdep.c:3895 [inline] __lock_acquire+0x2540/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x107/0x340 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:533 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:552 ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline] mi_read+0x2d4/0x5a0 fs/ntfs3/record.c:148 mi_format_new+0x1a3/0x610 fs/ntfs3/record.c:434 ni_add_subrecord+0xd1/0x460 fs/ntfs3/frecord.c:321 ntfs_look_free_mft+0x6aa/0xd50 fs/ntfs3/fsntfs.c:715 ni_create_attr_list+0x8ff/0x13d0 fs/ntfs3/frecord.c:828 ni_ins_attr_ext+0x43f/0xba0 fs/ntfs3/frecord.c:926 ni_insert_attr+0x2fb/0x870 fs/ntfs3/frecord.c:1093 ni_insert_nonresident+0x277/0x680 fs/ntfs3/frecord.c:1428 indx_create_allocate fs/ntfs3/index.c:1450 [inline] indx_insert_into_root+0xe66/0x1d60 fs/ntfs3/index.c:1703 indx_insert_entry+0x55d/0x720 fs/ntfs3/index.c:1991 ni_add_name+0x8a8/0xc90 fs/ntfs3/frecord.c:2931 ni_rename+0x4a/0x100 fs/ntfs3/frecord.c:2962 ntfs_rename+0x735/0xbf0 fs/ntfs3/namei.c:332 vfs_rename+0xbb6/0xee0 fs/namei.c:5929 do_renameat2+0x538/0x8f0 fs/namei.c:6047 __do_sys_rename fs/namei.c:6090 [inline] __se_sys_rename fs/namei.c:6088 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:6088 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f821ccdf749 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:00007f821af1d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f821cf36090 RCX: 00007f821ccdf749 RDX: 0000000000000000 RSI: 00002000000012c0 RDI: 0000200000001180 RBP: 00007f821cd63f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f821cf36128 R14: 00007f821cf36090 R15: 00007fff65528bd8