====================================================== WARNING: possible circular locking dependency detected 6.6.101-syzkaller #0 Not tainted ------------------------------------------------------ syz.0.1970/14008 is trying to acquire lock: ffff88805aa6cd70 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline] ffff88805aa6cd70 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: ntfs_file_mmap+0x54c/0x730 fs/ntfs3/file.c:302 but task is already holding lock: ffff88807a3e5720 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:124 [inline] ffff88807a3e5720 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x168/0x400 mm/util.c:554 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_lock){++++}-{3:3}: down_read_killable+0x50/0x340 kernel/locking/rwsem.c:1543 mmap_read_lock_killable+0x1d/0x70 include/linux/mmap_lock.h:155 get_mmap_lock_carefully mm/memory.c:5367 [inline] lock_mm_and_find_vma+0x2a3/0x300 mm/memory.c:5418 do_user_addr_fault+0x36c/0x12e0 arch/x86/mm/fault.c:1345 handle_page_fault arch/x86/mm/fault.c:1465 [inline] exc_page_fault+0x67/0x110 arch/x86/mm/fault.c:1521 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608 fault_in_readable+0xd0/0x160 mm/gup.c:1904 fault_in_iov_iter_readable+0xbf/0x2e0 lib/iov_iter.c:216 ntfs_compress_write+0xed6/0x1ac0 fs/ntfs3/file.c:964 ntfs_file_write_iter+0x450/0x700 fs/ntfs3/file.c:1119 do_iter_readv_writev fs/read_write.c:-1 [inline] do_iter_write+0x79a/0xc70 fs/read_write.c:860 vfs_writev fs/read_write.c:933 [inline] do_pwritev+0x205/0x340 fs/read_write.c:1030 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 down_write+0x97/0x1f0 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:804 [inline] ntfs_file_mmap+0x54c/0x730 fs/ntfs3/file.c:302 call_mmap include/linux/fs.h:2023 [inline] mmap_file mm/internal.h:98 [inline] __mmap_region mm/mmap.c:2786 [inline] mmap_region+0xe57/0x1f80 mm/mmap.c:2937 do_mmap+0x8d1/0xfd0 mm/mmap.c:1381 vm_mmap_pgoff+0x1c0/0x400 mm/util.c:556 ksys_mmap_pgoff+0x520/0x700 mm/mmap.c:1427 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 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.0.1970/14008: #0: ffff88807a3e5720 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:124 [inline] #0: ffff88807a3e5720 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x168/0x400 mm/util.c:554 stack backtrace: CPU: 0 PID: 14008 Comm: syz.0.1970 Not tainted 6.6.101-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 check_noncircular+0x2bd/0x3c0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 down_write+0x97/0x1f0 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:804 [inline] ntfs_file_mmap+0x54c/0x730 fs/ntfs3/file.c:302 call_mmap include/linux/fs.h:2023 [inline] mmap_file mm/internal.h:98 [inline] __mmap_region mm/mmap.c:2786 [inline] mmap_region+0xe57/0x1f80 mm/mmap.c:2937 do_mmap+0x8d1/0xfd0 mm/mmap.c:1381 vm_mmap_pgoff+0x1c0/0x400 mm/util.c:556 ksys_mmap_pgoff+0x520/0x700 mm/mmap.c:1427 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7ff86bd8ebe9 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:00007ff86cc42038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007ff86bfb5fa0 RCX: 00007ff86bd8ebe9 RDX: 00000000007ffffe RSI: 0000000000604100 RDI: 0000200000000000 RBP: 00007ff86be11e19 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000004002011 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff86bfb6038 R14: 00007ff86bfb5fa0 R15: 00007fff6d9798a8