============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.0.0/5355 is trying to acquire lock: ffff8880470fb268 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1252 [inline] ffff8880470fb268 (&ni->ni_lock/5){+.+.}-{4:4}, at: mi_read+0x314/0x610 fs/ntfs3/record.c:148 but task is already holding lock: ffff888047101628 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1252 [inline] ffff888047101628 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_rename+0x728/0xd20 fs/ntfs3/namei.c:356 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 locks held by syz.0.0/5355: 5, on CPU#0: #0: ffff888038020478 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531 #1: ffff888047104390 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1072 [inline] #1: ffff888047104390 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3791 [inline] #1: ffff888047104390 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: __start_renaming+0x148/0x410 fs/namei.c:3884 #2: ffff8880471040f8 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1257 [inline] #2: ffff8880471040f8 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ntfs_rename+0x6d3/0xd20 fs/ntfs3/namei.c:355 #3: ffff888047101628 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1252 [inline] #3: ffff888047101628 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_rename+0x728/0xd20 fs/ntfs3/namei.c:356 #4: ffff88803c458138 (&wnd->rw_lock/1){+.+.}-{4:4}, at: ntfs_look_free_mft+0x170/0xd90 fs/ntfs3/fsntfs.c:600 stack backtrace: CPU: 0 UID: 0 PID: 5355 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_deadlock_bug+0x27a/0x290 kernel/locking/lockdep.c:3085 check_deadlock kernel/locking/lockdep.c:3137 [inline] validate_chain kernel/locking/lockdep.c:3939 [inline] __lock_acquire+0x25db/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 ni_lock fs/ntfs3/ntfs_fs.h:1252 [inline] mi_read+0x314/0x610 fs/ntfs3/record.c:148 mi_format_new+0x1a1/0x610 fs/ntfs3/record.c:462 ni_add_subrecord+0x107/0x4a0 fs/ntfs3/frecord.c:336 ntfs_look_free_mft+0x4e5/0xd90 fs/ntfs3/fsntfs.c:744 ni_create_attr_list+0xb0a/0x1750 fs/ntfs3/frecord.c:859 ni_ins_attr_ext+0x4a0/0xba0 fs/ntfs3/frecord.c:958 ni_insert_attr fs/ntfs3/frecord.c:1126 [inline] ni_insert_resident fs/ntfs3/frecord.c:1514 [inline] ni_add_name+0x73f/0xd30 fs/ntfs3/frecord.c:2819 ni_rename+0x4a/0x110 fs/ntfs3/frecord.c:2859 ntfs_rename+0x793/0xd20 fs/ntfs3/namei.c:360 vfs_rename+0xbd9/0xef0 fs/namei.c:6226 filename_renameat2+0x54e/0x9f0 fs/namei.c:6344 __do_sys_rename fs/namei.c:6388 [inline] __se_sys_rename+0x55/0x2c0 fs/namei.c:6384 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5e279a9a99 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:00007f5e23d91fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f5e27c36380 RCX: 00007f5e279a9a99 RDX: 0000000000000000 RSI: 00002000000070c0 RDI: 0000200000006fc0 RBP: 00007f5e27a3918b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5e27c36418 R14: 00007f5e27c36380 R15: 00007ffd6eddce78 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00 ntfs3(loop0): failed to read volume at offset 0x46c00