loop7: detected capacity change from 0 to 4096 ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.7.230/7920 is trying to acquire lock: ffff88805d1d5d30 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1113 [inline] ffff88805d1d5d30 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: mi_read+0x2d4/0x5a0 fs/ntfs3/record.c:148 but task is already holding lock: ffff88805ee69050 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1113 [inline] ffff88805ee69050 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_rename+0x6f7/0xbf0 fs/ntfs3/namei.c:328 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock#2/5); lock(&ni->ni_lock#2/5); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by syz.7.230/7920: #0: ffff888039d52480 (sb_writers#20){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:508 #1: ffff88805d23f6f8 (&type->i_mutex_dir_key#16/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1025 [inline] #1: ffff88805d23f6f8 (&type->i_mutex_dir_key#16/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3360 [inline] #1: ffff88805d23f6f8 (&type->i_mutex_dir_key#16/1){+.+.}-{4:4}, at: do_renameat2+0x3b9/0xa50 fs/namei.c:5311 #2: ffff88805d23f440 (&ni->ni_lock/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1118 [inline] #2: ffff88805d23f440 (&ni->ni_lock/6){+.+.}-{4:4}, at: ntfs_rename+0x6de/0xbf0 fs/ntfs3/namei.c:327 #3: ffff88805ee69050 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1113 [inline] #3: ffff88805ee69050 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_rename+0x6f7/0xbf0 fs/ntfs3/namei.c:328 #4: ffff888039d54118 (&wnd->rw_lock/1){+.+.}-{4:4}, at: ntfs_look_free_mft+0x163/0xd50 fs/ntfs3/fsntfs.c:571 stack backtrace: CPU: 0 UID: 0 PID: 7920 Comm: syz.7.230 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_deadlock_bug+0x28b/0x2a0 kernel/locking/lockdep.c:3041 check_deadlock kernel/locking/lockdep.c:3093 [inline] validate_chain+0x1a3f/0x2140 kernel/locking/lockdep.c:3895 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:535 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:547 ni_lock fs/ntfs3/ntfs_fs.h:1113 [inline] mi_read+0x2d4/0x5a0 fs/ntfs3/record.c:148 mi_format_new+0x1a3/0x610 fs/ntfs3/record.c:434 ni_add_subrecord+0xd0/0x440 fs/ntfs3/frecord.c:321 ntfs_look_free_mft+0x6aa/0xd50 fs/ntfs3/fsntfs.c:715 ni_create_attr_list+0x8ff/0x13d0 fs/ntfs3/frecord.c:826 ni_ins_attr_ext+0x43e/0xb50 fs/ntfs3/frecord.c:924 ni_insert_attr fs/ntfs3/frecord.c:1091 [inline] ni_insert_resident fs/ntfs3/frecord.c:1475 [inline] ni_add_name+0x6df/0xc90 fs/ntfs3/frecord.c:2987 ni_rename+0x4a/0x100 fs/ntfs3/frecord.c:3026 ntfs_rename+0x735/0xbf0 fs/ntfs3/namei.c:332 vfs_rename+0xb34/0xe80 fs/namei.c:5216 do_renameat2+0x6a2/0xa50 fs/namei.c:5364 __do_sys_rename fs/namei.c:5411 [inline] __se_sys_rename fs/namei.c:5409 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5409 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0c9816efc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0c963ce038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f0c983c5fa0 RCX: 00007f0c9816efc9 RDX: 0000000000000000 RSI: 0000200000000f00 RDI: 0000200000000200 RBP: 00007f0c981f1f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0c983c6038 R14: 00007f0c983c5fa0 R15: 00007fffbb0c7b98