ntfs3(loop3): Mark volume as dirty due to NTFS errors ntfs3(loop3): Failed to initialize $Extend/$Reparse. ntfs3(loop3): ino=1b, mi_enum_attr ====================================================== WARNING: possible circular locking dependency detected 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 Not tainted ------------------------------------------------------ syz.3.131/7309 is trying to acquire lock: ffff0000f355b518 (&ni->file.run_lock#2){++++}-{4:4}, at: run_unpack_ex+0x6cc/0x998 fs/ntfs3/run.c:1119 but task is already holding lock: ffff0000d37b6270 (&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_file_write_iter+0x350/0x6b4 fs/ntfs3/file.c:1220 iter_file_splice_write+0x774/0xd20 fs/splice.c:738 ntfs_file_splice_write+0x158/0x1e0 fs/ntfs3/file.c:1347 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0xec/0x14c fs/splice.c:1158 splice_direct_to_actor+0x414/0x994 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x130/0x210 fs/splice.c:1227 do_sendfile+0x3cc/0x658 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __arm64_sys_sendfile64+0x128/0x274 fs/read_write.c:1417 __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.3.131/7309: #0: ffff0000d4160428 (sb_writers#20){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:557 #1: ffff0000f3718af0 (&type->i_mutex_dir_key#13/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:914 [inline] #1: ffff0000f3718af0 (&type->i_mutex_dir_key#13/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3272 [inline] #1: ffff0000f3718af0 (&type->i_mutex_dir_key#13/1){+.+.}-{4:4}, at: do_renameat2+0x364/0x8c8 fs/namei.c:5224 #2: ffff0000f3718858 (&ni->ni_lock/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1118 [inline] #2: ffff0000f3718858 (&ni->ni_lock/6){+.+.}-{4:4}, at: ntfs_lookup+0xf0/0x1f0 fs/ntfs3/namei.c:84 #3: ffff0000d37b6270 (&wnd->rw_lock){++++}-{4:4}, at: run_unpack_ex+0x60c/0x998 fs/ntfs3/run.c:1100 stack backtrace: CPU: 0 UID: 0 PID: 7309 Comm: syz.3.131 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