loop1: detected capacity change from 4096 to 0 ntfs3: loop1: ino=5, "/" directory corrupted ============================================ WARNING: possible recursive locking detected 6.1.114-syzkaller #0 Not tainted -------------------------------------------- syz.1.346/5859 is trying to acquire lock: ffff888070084ac0 (&ni->ni_lock){+.+.}-{3:3}, at: ntfs_set_state+0x1fa/0x660 fs/ntfs3/fsntfs.c:920 but task is already holding lock: ffff888070332d40 (&ni->ni_lock){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1116 [inline] ffff888070332d40 (&ni->ni_lock){+.+.}-{3:3}, at: ni_write_inode+0x16b/0x1070 fs/ntfs3/frecord.c:3318 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock); lock(&ni->ni_lock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz.1.346/5859: #0: ffff888058966460 (sb_writers#14){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393 #1: ffff888070332fe0 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff888070332fe0 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: do_truncate+0x208/0x300 fs/open.c:63 #2: ffff888070332d40 (&ni->ni_lock){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1116 [inline] #2: ffff888070332d40 (&ni->ni_lock){+.+.}-{3:3}, at: ni_write_inode+0x16b/0x1070 fs/ntfs3/frecord.c:3318 #3: ffff888070241720 (&ni->ni_lock){+.+.}-{3:3}, at: ni_trylock fs/ntfs3/ntfs_fs.h:1116 [inline] #3: ffff888070241720 (&ni->ni_lock){+.+.}-{3:3}, at: ni_update_parent+0x9ce/0xdc0 fs/ntfs3/frecord.c:3286 stack backtrace: CPU: 0 PID: 5859 Comm: syz.1.346 Not tainted 6.1.114-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 ntfs_set_state+0x1fa/0x660 fs/ntfs3/fsntfs.c:920 indx_read+0x5a3/0xc40 indx_find+0x467/0xb60 fs/ntfs3/index.c:1181 indx_update_dup+0x476/0x850 fs/ntfs3/index.c:2644 ni_update_parent+0xa14/0xdc0 fs/ntfs3/frecord.c:3289 ni_write_inode+0xe34/0x1070 fs/ntfs3/frecord.c:3372 ntfs_truncate fs/ntfs3/file.c:505 [inline] ntfs3_setattr+0x7c2/0xb70 fs/ntfs3/file.c:791 notify_change+0xce3/0xfc0 fs/attr.c:499 do_truncate+0x21c/0x300 fs/open.c:65 handle_truncate fs/namei.c:3285 [inline] do_open fs/namei.c:3630 [inline] path_openat+0x27e2/0x2e60 fs/namei.c:3783 do_filp_open+0x230/0x480 fs/namei.c:3810 do_sys_openat2+0x13b/0x4f0 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1345 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:0x7fbfe8f7e719 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:00007fbfe9e3c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fbfe9135f80 RCX: 00007fbfe8f7e719 RDX: 000000000000275a RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007fbfe8ff132e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fbfe9135f80 R15: 00007ffe53daa948 ntfs3: loop1: Mark volume as dirty due to NTFS errors