============================================ WARNING: possible recursive locking detected 6.15.0-rc4-syzkaller-00291-g2a239ffbebb5 #0 Not tainted -------------------------------------------- syz.7.413/9245 is trying to acquire lock: ffff88807ae4f680 (&ni->ni_lock /5 ){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1105 [inline] ){+.+.}-{4:4}, at: mi_read+0x2d4/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff888054514a70 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1105 [inline] (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_link+0xf6/0x280 fs/ntfs3/namei.c:141 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.7.413/9245: #0: ffff8880659c6420 (sb_writers#24){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:556 #1: ffff8880545145b0 (&type->i_mutex_dir_key#14/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:902 [inline] #1: ffff8880545145b0 (&type->i_mutex_dir_key#14/1){+.+.}-{4:4}, at: filename_create+0x1f9/0x470 fs/namei.c:4132 #2: ffff888054514d08 (&sb->s_type->i_mutex_key#40){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:867 [inline] #2: ffff888054514d08 (&sb->s_type->i_mutex_key#40){+.+.}-{4:4}, at: vfs_link+0x3b4/0x6e0 fs/namei.c:4838 #3: ffff888054514318 (&ni->ni_lock#3/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1110 [inline] #3: ffff888054514318 (&ni->ni_lock#3/6){+.+.}-{4:4}, at: ntfs_link+0xdb/0x280 fs/ntfs3/namei.c:139 #4: ffff888054514a70 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1105 [inline] #4: ffff888054514a70 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_link+0xf6/0x280 fs/ntfs3/namei.c:141 #5: ffff8880659c4128 (&wnd->rw_lock/1){+.+.}-{4:4}, at: ntfs_look_free_mft+0x163/0xd50 fs/ntfs3/fsntfs.c:571 stack backtrace: CPU: 1 UID: 0 PID: 9245 Comm: syz.7.413 Not tainted 6.15.0-rc4-syzkaller-00291-g2a239ffbebb5 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/29/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_deadlock_bug+0x28b/0x2a0 kernel/locking/lockdep.c:3042 check_deadlock kernel/locking/lockdep.c:3094 [inline] validate_chain+0x1a3f/0x2140 kernel/locking/lockdep.c:3896 __lock_acquire+0xaac/0xd20 kernel/locking/lockdep.c:5235 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5866 __mutex_lock_common kernel/locking/mutex.c:601 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:746 ni_lock fs/ntfs3/ntfs_fs.h:1105 [inline] mi_read+0x2d4/0x5a0 fs/ntfs3/record.c:148 mi_format_new+0x1a3/0x610 fs/ntfs3/record.c:434 ni_add_subrecord+0xd0/0x440 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:826 ni_ins_attr_ext+0x43e/0xb50 fs/ntfs3/frecord.c:924 ni_insert_attr fs/ntfs3/frecord.c:1091 [inline] ni_insert_resident fs/ntfs3/frecord.c:1475 [inline] ni_add_name+0x6df/0xc90 fs/ntfs3/frecord.c:2987 ntfs_link_inode+0x132/0x180 fs/ntfs3/inode.c:1698 ntfs_link+0x118/0x280 fs/ntfs3/namei.c:146 vfs_link+0x4ea/0x6e0 fs/namei.c:4847 do_linkat+0x272/0x560 fs/namei.c:4917 __do_sys_link fs/namei.c:4951 [inline] __se_sys_link fs/namei.c:4949 [inline] __x64_sys_link+0x82/0x90 fs/namei.c:4949 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7efe8ef8e969 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:00007efe8fd81038 EFLAGS: 00000246 ORIG_RAX: 0000000000000056 RAX: ffffffffffffffda RBX: 00007efe8f1b5fa0 RCX: 00007efe8ef8e969 RDX: 0000000000000000 RSI: 0000200000000240 RDI: 00002000000001c0 RBP: 00007efe8f010ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007efe8f1b5fa0 R15: 00007ffe1bde61b8