============================================ WARNING: possible recursive locking detected 6.15.0-rc4-syzkaller-00189-g2bfcee565c3a #0 Not tainted -------------------------------------------- syz.6.245/7705 is trying to acquire lock: ffff888077b59e60 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1105 [inline] ffff888077b59e60 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: mi_read+0x2d4/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff888058934a70 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1105 [inline] ffff888058934a70 (&ni->ni_lock#2/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#2/5); lock(&ni->ni_lock#2/5); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by syz.6.245/7705: #0: ffff88807dff0420 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:556 #1: ffff888058932850 (&type->i_mutex_dir_key#9/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:902 [inline] #1: ffff888058932850 (&type->i_mutex_dir_key#9/1){+.+.}-{4:4}, at: filename_create+0x1f9/0x470 fs/namei.c:4132 #2: ffff888058934d08 (&sb->s_type->i_mutex_key#21){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:867 [inline] #2: ffff888058934d08 (&sb->s_type->i_mutex_key#21){+.+.}-{4:4}, at: vfs_link+0x3b4/0x6e0 fs/namei.c:4838 #3: ffff8880589325b8 (&ni->ni_lock/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1110 [inline] #3: ffff8880589325b8 (&ni->ni_lock/6){+.+.}-{4:4}, at: ntfs_link+0xdb/0x280 fs/ntfs3/namei.c:139 #4: ffff888058934a70 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1105 [inline] #4: ffff888058934a70 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_link+0xf6/0x280 fs/ntfs3/namei.c:141 #5: ffff8880793a8128 (&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: 7705 Comm: syz.6.245 Not tainted 6.15.0-rc4-syzkaller-00189-g2bfcee565c3a #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/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:0x7f4d0d78e969 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:00007f4d0e631038 EFLAGS: 00000246 ORIG_RAX: 0000000000000056 RAX: ffffffffffffffda RBX: 00007f4d0d9b5fa0 RCX: 00007f4d0d78e969 RDX: 0000000000000000 RSI: 0000200000000240 RDI: 00002000000001c0 RBP: 00007f4d0d810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d0d9b5fa0 R15: 00007ffff4f73c28