============================================ WARNING: possible recursive locking detected 6.1.19-syzkaller #0 Not tainted -------------------------------------------- syz-executor.5/28098 is trying to acquire lock: ffff88802c92c360 (&ni->ni_lock/4){+.+.}-{3:3} , at: ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] , at: mi_read+0x2f2/0x560 fs/ntfs3/record.c:148 but task is already holding lock: ffff88802c928fc0 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] ffff88802c928fc0 (&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.5/28098: #0: ffff88802c929260 (&type->i_mutex_dir_key#13){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:766 [inline] #0: ffff88802c929260 (&type->i_mutex_dir_key#13){++++}-{3:3}, at: open_last_lookups fs/namei.c:3480 [inline] #0: ffff88802c929260 (&type->i_mutex_dir_key#13){++++}-{3:3}, at: path_openat+0x7a7/0x2e60 fs/namei.c:3711 #1: ffff88802c928fc0 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] #1: ffff88802c928fc0 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x190 fs/ntfs3/namei.c:82 stack backtrace: CPU: 0 PID: 28098 Comm: syz-executor.5 Not tainted 6.1.19-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:2991 [inline] check_deadlock kernel/locking/lockdep.c:3034 [inline] validate_chain+0x4726/0x58e0 kernel/locking/lockdep.c:3819 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5056 lock_acquire+0x23a/0x630 kernel/locking/lockdep.c:5669 __mutex_lock_common+0x1d4/0x2520 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 ni_lock fs/ntfs3/ntfs_fs.h:1108 [inline] mi_read+0x2f2/0x560 fs/ntfs3/record.c:148 ntfs_read_mft fs/ntfs3/inode.c:69 [inline] ntfs_iget5+0x453/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:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10fb/0x2e60 fs/namei.c:3711 do_filp_open+0x230/0x480 fs/namei.c:3741 do_sys_openat2+0x13b/0x500 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_open fs/open.c:1334 [inline] __se_sys_open fs/open.c:1330 [inline] __x64_sys_open+0x221/0x270 fs/open.c:1330 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+0x63/0xcd RIP: 0033:0x7f7daf48c0f9 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:00007f7db01cf168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f7daf5abf80 RCX: 00007f7daf48c0f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000240 RBP: 00007f7daf4e7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffe8f314ef R14: 00007f7db01cf300 R15: 0000000000022000