loop0: detected capacity change from 0 to 4096 ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512) ============================================ WARNING: possible recursive locking detected 6.1.27-syzkaller #0 Not tainted -------------------------------------------- syz-executor107/4223 is trying to acquire lock: ffff0000df9f1e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] ffff0000df9f1e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: mi_read+0x278/0x488 fs/ntfs3/record.c:148 but task is already holding lock: ffff0000df9f6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] ffff0000df9f6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf4/0x1a4 fs/ntfs3/namei.c:82 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock/4); lock(&ni->ni_lock/4); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor107/4223: #0: ffff0000df9f6ae0 (&type->i_mutex_dir_key#6){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:766 [inline] #0: ffff0000df9f6ae0 (&type->i_mutex_dir_key#6){++++}-{3:3}, at: lookup_slow+0x50/0x84 fs/namei.c:1701 #1: ffff0000df9f6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] #1: ffff0000df9f6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf4/0x1a4 fs/ntfs3/namei.c:82 stack backtrace: CPU: 0 PID: 4223 Comm: syz-executor107 Not tainted 6.1.27-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 __lock_acquire+0x6310/0x764c kernel/locking/lockdep.c:5056 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] mi_read+0x278/0x488 fs/ntfs3/record.c:148 ntfs_read_mft fs/ntfs3/inode.c:69 [inline] ntfs_iget5+0x34c/0x2b38 fs/ntfs3/inode.c:517 dir_search_u+0x298/0x324 fs/ntfs3/dir.c:264 ntfs_lookup+0x104/0x1a4 fs/ntfs3/namei.c:83 __lookup_slow+0x250/0x374 fs/namei.c:1685 lookup_slow+0x60/0x84 fs/namei.c:1702 walk_component+0x280/0x36c fs/namei.c:1993 lookup_last fs/namei.c:2450 [inline] path_lookupat+0x13c/0x3d0 fs/namei.c:2474 filename_lookup+0x1d4/0x4e0 fs/namei.c:2503 user_path_at_empty+0x5c/0x1a4 fs/namei.c:2876 user_path_at include/linux/namei.h:57 [inline] path_setxattr+0xbc/0x258 fs/xattr.c:631 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:648 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581