====================================================== WARNING: possible circular locking dependency detected 6.15.0-rc4-syzkaller-00291-g2a239ffbebb5 #0 Not tainted ------------------------------------------------------ syz.9.134/7426 is trying to acquire lock: ffff88805c1299a0 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:867 [inline] ffff88805c1299a0 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: ntfs_file_mmap+0x525/0x730 fs/ntfs3/file.c:397 but task is already holding lock: ffff88807eb30be0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock_killable include/linux/mmap_lock.h:146 [inline] ffff88807eb30be0 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x1bd/0x4c0 mm/util.c:577 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_lock){++++}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5866 gup_fast_fallback+0x21e/0x1d60 mm/gup.c:3401 iov_iter_extract_user_pages lib/iov_iter.c:1849 [inline] iov_iter_extract_pages+0x35a/0x5e0 lib/iov_iter.c:1912 dio_refill_pages fs/direct-io.c:172 [inline] dio_get_page fs/direct-io.c:213 [inline] do_direct_IO fs/direct-io.c:915 [inline] __blockdev_direct_IO+0x10ed/0x3310 fs/direct-io.c:1243 blockdev_direct_IO include/linux/fs.h:3422 [inline] ntfs_direct_IO+0x195/0x3a0 fs/ntfs3/inode.c:809 generic_file_direct_write+0x1d8/0x3e0 mm/filemap.c:4037 __generic_file_write_iter+0x11d/0x230 mm/filemap.c:4206 ntfs_file_write_iter+0x71c/0x820 fs/ntfs3/file.c:1287 do_iter_readv_writev+0x56b/0x7f0 fs/read_write.c:-1 vfs_writev+0x306/0x9a0 fs/read_write.c:1055 do_pwritev fs/read_write.c:1151 [inline] __do_sys_pwritev2 fs/read_write.c:1209 [inline] __se_sys_pwritev2+0x179/0x290 fs/read_write.c:1200 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3909 __lock_acquire+0xaac/0xd20 kernel/locking/lockdep.c:5235 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5866 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:867 [inline] ntfs_file_mmap+0x525/0x730 fs/ntfs3/file.c:397 call_mmap include/linux/fs.h:2243 [inline] mmap_file mm/internal.h:167 [inline] __mmap_new_file_vma mm/vma.c:2353 [inline] __mmap_new_vma mm/vma.c:2417 [inline] __mmap_region mm/vma.c:2519 [inline] mmap_region+0x103b/0x1e50 mm/vma.c:2597 do_mmap+0xc68/0x1100 mm/mmap.c:561 vm_mmap_pgoff+0x31b/0x4c0 mm/util.c:579 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:607 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_lock); lock(&sb->s_type->i_mutex_key#20); lock(&mm->mmap_lock); lock(&sb->s_type->i_mutex_key#20); *** DEADLOCK *** 1 lock held by syz.9.134/7426: #0: ffff88807eb30be0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock_killable include/linux/mmap_lock.h:146 [inline] #0: ffff88807eb30be0 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x1bd/0x4c0 mm/util.c:577 stack backtrace: CPU: 0 UID: 0 PID: 7426 Comm: syz.9.134 Not tainted 6.15.0-rc4-syzkaller-00291-g2a239ffbebb5 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/29/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2079 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2211 check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3909 __lock_acquire+0xaac/0xd20 kernel/locking/lockdep.c:5235 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5866 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:867 [inline] ntfs_file_mmap+0x525/0x730 fs/ntfs3/file.c:397 call_mmap include/linux/fs.h:2243 [inline] mmap_file mm/internal.h:167 [inline] __mmap_new_file_vma mm/vma.c:2353 [inline] __mmap_new_vma mm/vma.c:2417 [inline] __mmap_region mm/vma.c:2519 [inline] mmap_region+0x103b/0x1e50 mm/vma.c:2597 do_mmap+0xc68/0x1100 mm/mmap.c:561 vm_mmap_pgoff+0x31b/0x4c0 mm/util.c:579 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:607 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8d43b8e969 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:00007f8d44a39038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f8d43db5fa0 RCX: 00007f8d43b8e969 RDX: 0000000000000006 RSI: 0000000000002000 RDI: 0000200000000000 RBP: 00007f8d43c10ab1 R08: 000000000000000a R09: 0000000000000000 R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f8d43db5fa0 R15: 00007fff96f30718