loop0: detected capacity change from 0 to 4096 ntfs3: loop0: Mark volume as dirty due to NTFS errors ntfs3: loop0: Failed to load $Extend. ============================================ WARNING: possible recursive locking detected 6.1.124-syzkaller #0 Not tainted -------------------------------------------- syz-executor500/4245 is trying to acquire lock: ffff88806ec51e80 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] ffff88806ec51e80 (&ni->ni_lock/5){+.+.}-{3:3}, at: mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff88806ec54360 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] ffff88806ec54360 (&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-executor500/4245: #0: ffff888030c66460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393 #1: ffff88806ec53ea0 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: do_renameat2+0x65a/0x1440 fs/namei.c:4966 #2: ffff88806ec54600 (&sb->s_type->i_mutex_key#15/4){+.+.}-{3:3}, at: vfs_rename+0x7e4/0x10f0 fs/namei.c:4845 #3: ffff88806ec53c00 (&ni->ni_lock/6){+.+.}-{3:3}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1106 [inline] #3: ffff88806ec53c00 (&ni->ni_lock/6){+.+.}-{3:3}, at: ntfs_rename+0x6fa/0xd10 fs/ntfs3/namei.c:314 #4: ffff88806ec54360 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1101 [inline] #4: ffff88806ec54360 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_rename+0x710/0xd10 fs/ntfs3/namei.c:315 #5: ffff888030c64120 (&wnd->rw_lock/1){+.+.}-{3:3}, at: ntfs_look_free_mft+0x1e1/0x10c0 fs/ntfs3/fsntfs.c:542 stack backtrace: CPU: 0 PID: 4245 Comm: syz-executor500 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:0x7fd4c2eb77b9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe7ad919e8 EFLAGS: 0