ntfs3(loop2): ino=1b, mi_enum_attr ====================================================== WARNING: possible circular locking dependency detected 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 Not tainted ------------------------------------------------------ syz.2.247/8165 is trying to acquire lock: ffff0000ddb297b8 (&ni->file.run_lock#2){++++}-{4:4}, at: run_unpack_ex+0x6cc/0x998 fs/ntfs3/run.c:1119 but task is already holding lock: ffff0000c2390270 (&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 mark_as_free_ex+0x40/0x324 fs/ntfs3/fsntfs.c:2464 run_deallocate_ex+0x150/0x2bc fs/ntfs3/attrib.c:122 attr_collapse_range+0x944/0x120c fs/ntfs3/attrib.c:1972 ntfs_fallocate+0x634/0xdd4 fs/ntfs3/file.c:617 vfs_fallocate+0x52c/0x668 fs/open.c:342 ksys_fallocate fs/open.c:366 [inline] __do_sys_fallocate fs/open.c:371 [inline] __se_sys_fallocate fs/open.c:369 [inline] __arm64_sys_fallocate+0xbc/0x10c fs/open.c:369 __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_open fs/namei.c:3686 [inline] open_last_lookups fs/namei.c:3807 [inline] path_openat+0xcc0/0x2c40 fs/namei.c:4043 do_filp_open+0x18c/0x36c fs/namei.c:4073 do_sys_openat2+0x11c/0x1b4 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1461 __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 *** 3 locks held by syz.2.247/8165: #0: ffff0000ddaf45b0 (&type->i_mutex_dir_key#11){++++}-{4:4}, at: inode_lock_shared include/linux/fs.h:884 [inline] #0: ffff0000ddaf45b0 (&type->i_mutex_dir_key#11){++++}-{4:4}, at: open_last_lookups fs/namei.c:3806 [inline] #0: ffff0000ddaf45b0 (&type->i_mutex_dir_key#11){++++}-{4:4}, at: path_openat+0x628/0x2c40 fs/namei.c:4043 #1: ffff0000ddaf4318 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1118 [inline] #1: ffff0000ddaf4318 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ntfs_lookup+0xf0/0x1f0 fs/ntfs3/namei.c:84 #2: ffff0000c2390270 (&wnd->rw_lock){++++}-{4:4}, at: run_unpack_ex+0x60c/0x998 fs/ntfs3/run.c:1100 stack backtrace: CPU: 0 UID: 0 PID: 8165 Comm: syz.2.247 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_open fs/namei.c:3686 [inline] open_last_lookups fs/namei.c:3807 [inline] path_openat+0xcc0/0x2c40 fs/namei.c:4043 do_filp_open+0x18c/0x36c fs/namei.c:4073 do_sys_openat2+0x11c/0x1b4 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1461 __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