============================================ WARNING: possible recursive locking detected 6.14.0-syzkaller-10764-gaa918db707fb #0 Not tainted -------------------------------------------- syz.1.51/6203 is trying to acquire lock: ffff88807bf5a5b8 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] ffff88807bf5a5b8 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: mi_read+0x2e1/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff88807bf5d920 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] ffff88807bf5d920 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_rename+0x78c/0xd40 fs/ntfs3/namei.c:312 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock#2/5); lock(&ni->ni_lock#2/5); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by syz.1.51/6203: #0: ffff88805e67e420 (sb_writers#24){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:556 #1: ffff88807bf09248 (&type->i_mutex_dir_key#15/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:902 [inline] #1: ffff88807bf09248 (&type->i_mutex_dir_key#15/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3230 [inline] #1: ffff88807bf09248 (&type->i_mutex_dir_key#15/1){+.+.}-{4:4}, at: do_renameat2+0x633/0x1290 fs/namei.c:5181 #2: ffff88807bf5dbb8 (&sb->s_type->i_mutex_key#29/4){+.+.}-{4:4}, at: vfs_rename+0x686/0xf10 fs/namei.c:5057 #3: ffff88807bf08fb0 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1116 [inline] #3: ffff88807bf08fb0 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ntfs_rename+0x771/0xd40 fs/ntfs3/namei.c:311 #4: ffff88807bf5d920 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] #4: ffff88807bf5d920 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_rename+0x78c/0xd40 fs/ntfs3/namei.c:312 #5: ffff88805e698128 (&wnd->rw_lock/1){+.+.}-{4:4}, at: ntfs_look_free_mft+0x1f4/0x10e0 fs/ntfs3/fsntfs.c:571 stack backtrace: CPU: 0 UID: 0 PID: 6203 Comm: syz.1.51 Not tainted 6.14.0-syzkaller-10764-gaa918db707fb #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x2be/0x2d0 kernel/locking/lockdep.c:3042 check_deadlock kernel/locking/lockdep.c:3094 [inline] validate_chain+0x928/0x24e0 kernel/locking/lockdep.c:3896 __lock_acquire+0xad5/0xd80 kernel/locking/lockdep.c:5235 lock_acquire+0x116/0x2f0 kernel/locking/lockdep.c:5866 __mutex_lock_common kernel/locking/mutex.c:587 [inline] __mutex_lock+0x1a5/0x10c0 kernel/locking/mutex.c:732 ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] mi_read+0x2e1/0x5a0 fs/ntfs3/record.c:148 mi_format_new+0x1a6/0x600 fs/ntfs3/record.c:434 ni_add_subrecord+0xe2/0x430 fs/ntfs3/frecord.c:378 ntfs_look_free_mft+0x881/0x10e0 fs/ntfs3/fsntfs.c:715 ni_create_attr_list+0xa3e/0x1650 fs/ntfs3/frecord.c:883 ni_ins_attr_ext+0x48d/0xd50 fs/ntfs3/frecord.c:981 ni_insert_attr fs/ntfs3/frecord.c:1148 [inline] ni_insert_resident fs/ntfs3/frecord.c:1532 [inline] ni_add_name+0x807/0xe70 fs/ntfs3/frecord.c:3044 ni_rename+0xc4/0x1e0 fs/ntfs3/frecord.c:3084 ntfs_rename+0x805/0xd40 fs/ntfs3/namei.c:317 vfs_rename+0xbce/0xf10 fs/namei.c:5086 do_renameat2+0xc8d/0x1290 fs/namei.c:5235 __do_sys_renameat2 fs/namei.c:5269 [inline] __se_sys_renameat2 fs/namei.c:5266 [inline] __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5266 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcaead8d169 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:00007fcaebc1f038 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007fcaeafa5fa0 RCX: 00007fcaead8d169 RDX: ffffffffffffff9c RSI: 0000200000000780 RDI: ffffffffffffff9c RBP: 00007fcaeae0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000200000000680 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fcaeafa5fa0 R15: 00007fffe47975e8 ntfs3(loop1): ino=0, "file0" encrypted i/o not supported