loop5: detected capacity change from 0 to 4096 ntfs3(loop5): Mark volume as dirty due to NTFS errors ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.5.637/8037 is trying to acquire lock: ffff888053250ef8 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1222 [inline] ffff888053250ef8 (&ni->ni_lock/5){+.+.}-{4:4}, at: mi_read+0x2dd/0x5b0 fs/ntfs3/record.c:148 but task is already holding lock: ffff8880530c2af8 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1222 [inline] ffff8880530c2af8 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_readdir+0x749/0xec0 fs/ntfs3/dir.c:499 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 3 locks held by syz.5.637/8037: #0: ffff88807f0c5eb0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320 fs/file.c:1259 #1: ffff8880530c2d80 (&type->i_mutex_dir_key#18){++++}-{4:4}, at: iterate_dir+0x209/0x4d0 fs/readdir.c:103 #2: ffff8880530c2af8 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1222 [inline] #2: ffff8880530c2af8 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_readdir+0x749/0xec0 fs/ntfs3/dir.c:499 stack backtrace: CPU: 0 UID: 0 PID: 8037 Comm: syz.5.637 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041 check_deadlock kernel/locking/lockdep.c:3093 [inline] validate_chain kernel/locking/lockdep.c:3895 [inline] __lock_acquire+0x24df/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 ni_lock fs/ntfs3/ntfs_fs.h:1222 [inline] mi_read+0x2dd/0x5b0 fs/ntfs3/record.c:148 ntfs_read_mft fs/ntfs3/inode.c:71 [inline] ntfs_iget5+0x433/0x3760 fs/ntfs3/inode.c:542 ntfs_dir_emit fs/ntfs3/dir.c:339 [inline] ntfs_read_hdr+0x787/0xc10 fs/ntfs3/dir.c:387 ntfs_readdir+0x9e1/0xec0 fs/ntfs3/dir.c:547 iterate_dir+0x2e2/0x4d0 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:319 [inline] __se_sys_getdents+0xf1/0x270 fs/readdir.c:304 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f40a559ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f40a63be028 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f40a5815fa0 RCX: 00007f40a559ce59 RDX: 00000000000000b8 RSI: 0000200000001fc0 RDI: 0000000000000004 RBP: 00007f40a5632e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f40a5816038 R14: 00007f40a5815fa0 R15: 00007fff57186bd8