============================================ WARNING: possible recursive locking detected 6.1.129-syzkaller #0 Not tainted -------------------------------------------- syz.4.728/7935 is trying to acquire lock: ffff888055c21e80 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] ffff888055c21e80 (&ni->ni_lock/5){+.+.}-{3:3}, at: mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff888055c27700 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] ffff888055c27700 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_rename+0x710/0xd10 fs/ntfs3/namei.c:315 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock/5); lock(&ni->ni_lock/5); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by syz.4.728/7935: #0: ffff888058fb2460 (sb_writers#18){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393 #1: ffff888055c27240 (&type->i_mutex_dir_key#10/1){+.+.}-{3:3}, at: do_renameat2+0x65a/0x1440 fs/namei.c:4966 #2: ffff888055c279a0 (&sb->s_type->i_mutex_key#48/4){+.+.}-{3:3}, at: vfs_rename+0x7e4/0x10f0 fs/namei.c:4845 #3: ffff888055c26fa0 (&ni->ni_lock/6){+.+.}-{3:3}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1106 [inline] #3: ffff888055c26fa0 (&ni->ni_lock/6){+.+.}-{3:3}, at: ntfs_rename+0x6fa/0xd10 fs/ntfs3/namei.c:314 #4: ffff888055c27700 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] #4: ffff888055c27700 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_rename+0x710/0xd10 fs/ntfs3/namei.c:315 #5: ffff88807a10e120 (&wnd->rw_lock/1){+.+.}-{3:3}, at: ntfs_look_free_mft+0x1e1/0x10c0 fs/ntfs3/fsntfs.c:542 stack backtrace: CPU: 0 PID: 7935 Comm: syz.4.728 Not tainted 6.1.129-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline] check_deadlock kernel/locking/lockdep.c:3026 [inline] validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747 ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148 mi_format_new+0x194/0x5f0 fs/ntfs3/record.c:411 ni_add_subrecord+0xde/0x430 fs/ntfs3/frecord.c:373 ntfs_look_free_mft+0x874/0x10c0 fs/ntfs3/fsntfs.c:686 ni_ins_attr_ext+0x710/0xbf0 fs/ntfs3/frecord.c:1040 ni_insert_attr fs/ntfs3/frecord.c:1143 [inline] ni_insert_resident fs/ntfs3/frecord.c:1527 [inline] ni_add_name+0x619/0xc30 fs/ntfs3/frecord.c:3105 ni_rename+0xbe/0x1e0 fs/ntfs3/frecord.c:3145 ntfs_rename+0x74a/0xd10 fs/ntfs3/namei.c:318 vfs_rename+0xd32/0x10f0 fs/namei.c:4874 do_renameat2+0xde0/0x1440 fs/namei.c:5027 __do_sys_rename fs/namei.c:5073 [inline] __se_sys_rename fs/namei.c:5071 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5071 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f2e1178d169 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:00007f2e12549038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f2e119a5fa0 RCX: 00007f2e1178d169 RDX: 0000000000000000 RSI: 0000400000000b80 RDI: 0000400000001640 RBP: 00007f2e1180e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2e119a5fa0 R15: 00007ffc0b9c7778