============================================ WARNING: possible recursive locking detected 6.14.0-rc6-syzkaller-00253-gcb82ca153949 #0 Not tainted -------------------------------------------- syz.5.504/8775 is trying to acquire lock: ffff8880588f3468 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] ffff8880588f3468 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: mi_read+0x466/0x660 fs/ntfs3/record.c:148 but task is already holding lock: ffff8880588f0858 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] ffff8880588f0858 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_rename+0x924/0xf20 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.5.504/8775: #0: ffff888034db6420 (sb_writers#16){.+.+}-{0:0}, at: do_renameat2+0x3d6/0xdd0 fs/namei.c:5156 #1: ffff8880588f1248 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:912 [inline] #1: ffff8880588f1248 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3217 [inline] #1: ffff8880588f1248 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3214 [inline] #1: ffff8880588f1248 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: do_renameat2+0xae4/0xdd0 fs/namei.c:5161 #2: ffff8880588f0af0 (&sb->s_type->i_mutex_key#21/4){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:912 [inline] #2: ffff8880588f0af0 (&sb->s_type->i_mutex_key#21/4){+.+.}-{4:4}, at: lock_two_nondirectories+0xed/0x200 fs/inode.c:1283 #3: ffff8880588f0fb0 (&ni->ni_lock/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1116 [inline] #3: ffff8880588f0fb0 (&ni->ni_lock/6){+.+.}-{4:4}, at: ntfs_rename+0x908/0xf20 fs/ntfs3/namei.c:311 #4: ffff8880588f0858 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] #4: ffff8880588f0858 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_rename+0x924/0xf20 fs/ntfs3/namei.c:312 #5: ffff88807e6b2128 (&wnd->rw_lock/1){+.+.}-{4:4}, at: ntfs_look_free_mft+0x346/0xdd0 fs/ntfs3/fsntfs.c:571 stack backtrace: CPU: 1 UID: 0 PID: 8775 Comm: syz.5.504 Not tainted 6.14.0-rc6-syzkaller-00253-gcb82ca153949 #0 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+0x116/0x1f0 lib/dump_stack.c:120 print_deadlock_bug+0x2e3/0x410 kernel/locking/lockdep.c:3039 check_deadlock kernel/locking/lockdep.c:3091 [inline] validate_chain kernel/locking/lockdep.c:3893 [inline] __lock_acquire+0x2117/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline] mi_read+0x466/0x660 fs/ntfs3/record.c:148 mi_format_new+0x3a1/0x580 fs/ntfs3/record.c:434 ni_add_subrecord+0xd1/0x4f0 fs/ntfs3/frecord.c:378 ntfs_look_free_mft+0x209/0xdd0 fs/ntfs3/fsntfs.c:715 ni_create_attr_list+0x8e6/0x14d0 fs/ntfs3/frecord.c:883 ni_ins_attr_ext+0x236/0xaf0 fs/ntfs3/frecord.c:981 ni_insert_attr+0x30e/0x870 fs/ntfs3/frecord.c:1148 ni_insert_resident+0xd2/0x3a0 fs/ntfs3/frecord.c:1532 ni_add_name+0x48d/0x820 fs/ntfs3/frecord.c:3044 ni_rename+0xa1/0x1a0 fs/ntfs3/frecord.c:3084 ntfs_rename+0x96f/0xf20 fs/ntfs3/namei.c:317 vfs_rename+0xf8b/0x21f0 fs/namei.c:5069 do_renameat2+0xc5f/0xdd0 fs/namei.c:5226 __do_sys_rename fs/namei.c:5273 [inline] __se_sys_rename fs/namei.c:5271 [inline] __x64_sys_rename+0x7d/0xa0 fs/namei.c:5271 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8a6898d169 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:00007f8a697f5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f8a68ba5fa0 RCX: 00007f8a6898d169 RDX: 0000000000000000 RSI: 0000400000000b80 RDI: 0000400000001640 RBP: 00007f8a68a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f8a68ba5fa0 R15: 00007ffe3e5c4698