============================================ WARNING: possible recursive locking detected 5.15.102-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/6088 is trying to acquire lock: ffff88809ae14360 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1107 [inline] ffff88809ae14360 (&ni->ni_lock/4){+.+.}-{3:3}, at: mi_read+0x2f2/0x560 fs/ntfs3/record.c:148 but task is already holding lock: ffff8880302e2d40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1107 [inline] ffff8880302e2d40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x190 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-executor.4/6088: #0: ffff8880302e2fe0 (&type->i_mutex_dir_key#10){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:797 [inline] #0: ffff8880302e2fe0 (&type->i_mutex_dir_key#10){++++}-{3:3}, at: open_last_lookups fs/namei.c:3403 [inline] #0: ffff8880302e2fe0 (&type->i_mutex_dir_key#10){++++}-{3:3}, at: path_openat+0x809/0x2ee0 fs/namei.c:3612 #1: ffff8880302e2d40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1107 [inline] #1: ffff8880302e2d40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x190 fs/ntfs3/namei.c:82 stack backtrace: CPU: 0 PID: 6088 Comm: syz-executor.4 Not tainted 5.15.102-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 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:2946 [inline] check_deadlock kernel/locking/lockdep.c:2989 [inline] validate_chain+0x46cf/0x58b0 kernel/locking/lockdep.c:3774 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011 lock_acquire+0x1ff/0x570 kernel/locking/lockdep.c:5622 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 ni_lock fs/ntfs3/ntfs_fs.h:1107 [inline] mi_read+0x2f2/0x560 fs/ntfs3/record.c:148 ntfs_read_mft fs/ntfs3/inode.c:69 [inline] ntfs_iget5+0x44c/0x3760 fs/ntfs3/inode.c:517 dir_search_u+0x2f6/0x390 fs/ntfs3/dir.c:264 ntfs_lookup+0x102/0x190 fs/ntfs3/namei.c:83 lookup_open fs/namei.c:3312 [inline] open_last_lookups fs/namei.c:3404 [inline] path_openat+0x10d2/0x2ee0 fs/namei.c:3612 do_filp_open+0x21c/0x460 fs/namei.c:3642 do_sys_openat2+0x13b/0x500 fs/open.c:1211 do_sys_open fs/open.c:1227 [inline] __do_sys_open fs/open.c:1235 [inline] __se_sys_open fs/open.c:1231 [inline] __x64_sys_open+0x221/0x270 fs/open.c:1231 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f93ef5460f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f93e5897168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f93ef666050 RCX: 00007f93ef5460f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000080 RBP: 00007f93ef5a1ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd8e82a3df R14: 00007f93e5897300 R15: 0000000000022000