loop4: detected capacity change from 0 to 4096 ntfs3: loop4: Mark volume as dirty due to NTFS errors ntfs3: loop4: Failed to load $Extend. ============================================ WARNING: possible recursive locking detected 6.1.124-syzkaller #0 Not tainted -------------------------------------------- syz.4.1024/7693 is trying to acquire lock: ffff88805d2d0fc0 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] ffff88805d2d0fc0 (&ni->ni_lock/5){+.+.}-{3:3}, at: mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff888055c49720 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] ffff888055c49720 (&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.1024/7693: #0: ffff888018d92460 (sb_writers#16){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393 #1: ffff888055c4bea0 (&type->i_mutex_dir_key#8/1){+.+.}-{3:3}, at: do_renameat2+0x65a/0x1440 fs/namei.c:4966 #2: ffff888055c499c0 (&sb->s_type->i_mutex_key#23/4){+.+.}-{3:3}, at: vfs_rename+0x7e4/0x10f0 fs/namei.c:4845 #3: ffff888055c4bc00 (&ni->ni_lock/6){+.+.}-{3:3}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1106 [inline] #3: ffff888055c4bc00 (&ni->ni_lock/6){+.+.}-{3:3}, at: ntfs_rename+0x6fa/0xd10 fs/ntfs3/namei.c:314 #4: ffff888055c49720 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] #4: ffff888055c49720 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_rename+0x710/0xd10 fs/ntfs3/namei.c:315 #5: ffff888018d94120 (&wnd->rw_lock/1){+.+.}-{3:3}, at: ntfs_look_free_mft+0x1e1/0x10c0 fs/ntfs3/fsntfs.c:542 stack backtrace: CPU: 0 PID: 7693 Comm: syz.4.1024 Not tainted 6.1.124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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+0x1a7/0x5c0 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_create_attr_list+0x9b6/0x1470 fs/ntfs3/frecord.c:875 ni_ins_attr_ext+0x330/0xbf0 fs/ntfs3/frecord.c:976 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:0x7f92af385d29 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:00007f92b00dd038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f92af575fa0 RCX: 00007f92af385d29 RDX: 0000000000000000 RSI: 0000000020000480 RDI: 0000000020000340 RBP: 00007f92af401b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f92af575fa0 R15: 00007ffcf1f81118