====================================================== WARNING: possible circular locking dependency detected 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 Not tainted ------------------------------------------------------ syz.4.358/8479 is trying to acquire lock: ffff0000f6653c70 (&ni->file.run_lock#2){++++}-{4:4}, at: run_unpack_ex+0x6cc/0x998 fs/ntfs3/run.c:1119 but task is already holding lock: ffff0000fea3e270 (&wnd->rw_lock){++++}-{4:4}, at: run_unpack_ex+0x60c/0x998 fs/ntfs3/run.c:1100 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&wnd->rw_lock){++++}-{4:4}: down_write_nested+0x58/0xcc kernel/locking/rwsem.c:1706 ntfs_look_for_free_space+0xbc/0x560 fs/ntfs3/fsntfs.c:362 attr_allocate_clusters+0x198/0x620 fs/ntfs3/attrib.c:159 attr_set_size+0x1064/0x2368 fs/ntfs3/attrib.c:574 ntfs_set_size+0x158/0x200 fs/ntfs3/inode.c:861 ntfs_extend+0x190/0x7fc fs/ntfs3/file.c:359 ntfs_setattr+0x244/0x954 fs/ntfs3/file.c:780 notify_change+0x9a4/0xc50 fs/attr.c:552 do_truncate+0x198/0x210 fs/open.c:68 vfs_truncate+0x398/0x444 fs/open.c:118 do_sys_truncate+0xe4/0x1a8 fs/open.c:141 __do_sys_truncate fs/open.c:153 [inline] __se_sys_truncate fs/open.c:151 [inline] __arm64_sys_truncate+0x5c/0x74 fs/open.c:151 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 -> #0 (&ni->file.run_lock#2){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1774/0x30a4 kernel/locking/lockdep.c:5237 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5868 down_read+0x58/0x2f8 kernel/locking/rwsem.c:1537 run_unpack_ex+0x6cc/0x998 fs/ntfs3/run.c:1119 ntfs_read_mft fs/ntfs3/inode.c:401 [inline] ntfs_iget5+0x19f4/0x2a44 fs/ntfs3/inode.c:540 dir_search_u+0x250/0x2a4 fs/ntfs3/dir.c:264 ntfs_lookup+0x100/0x1f0 fs/ntfs3/namei.c:85 lookup_one_qstr_excl+0x10c/0x2fc fs/namei.c:1697 do_renameat2+0x380/0x8c8 fs/namei.c:5230 __do_sys_renameat2 fs/namei.c:5312 [inline] __se_sys_renameat2 fs/namei.c:5309 [inline] __arm64_sys_renameat2+0xd8/0xf4 fs/namei.c:5309 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&wnd->rw_lock); lock(&ni->file.run_lock#2); lock(&wnd->rw_lock); rlock(&ni->file.run_lock#2); *** DEADLOCK *** 4 locks held by syz.4.358/8479: #0: ffff0000d2ca0428 (sb_writers#18){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:557 #1: ffff0000f66545b0 (&type->i_mutex_dir_key#11/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:914 [inline] #1: ffff0000f66545b0 (&type->i_mutex_dir_key#11/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3272 [inline] #1: ffff0000f66545b0 (&type->i_mutex_dir_key#11/1){+.+.}-{4:4}, at: do_renameat2+0x364/0x8c8 fs/namei.c:5224 #2: ffff0000f6654318 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1118 [inline] #2: ffff0000f6654318 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ntfs_lookup+0xf0/0x1f0 fs/ntfs3/namei.c:84 #3: ffff0000fea3e270 (&wnd->rw_lock){++++}-{4:4}, at: run_unpack_ex+0x60c/0x998 fs/ntfs3/run.c:1100 stack backtrace: CPU: 1 UID: 0 PID: 8479 Comm: syz.4.358 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x324/0x32c kernel/locking/lockdep.c:2043 check_noncircular+0x154/0x174 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1774/0x30a4 kernel/locking/lockdep.c:5237 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5868 down_read+0x58/0x2f8 kernel/locking/rwsem.c:1537 run_unpack_ex+0x6cc/0x998 fs/ntfs3/run.c:1119 ntfs_read_mft fs/ntfs3/inode.c:401 [inline] ntfs_iget5+0x19f4/0x2a44 fs/ntfs3/inode.c:540 dir_search_u+0x250/0x2a4 fs/ntfs3/dir.c:264 ntfs_lookup+0x100/0x1f0 fs/ntfs3/namei.c:85 lookup_one_qstr_excl+0x10c/0x2fc fs/namei.c:1697 do_renameat2+0x380/0x8c8 fs/namei.c:5230 __do_sys_renameat2 fs/namei.c:5312 [inline] __se_sys_renameat2 fs/namei.c:5309 [inline] __arm64_sys_renameat2+0xd8/0xf4 fs/namei.c:5309 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 ntfs3(loop4): ino=1e, mi_enum_attr