WARNING: The mand mount option has been deprecated and and is ignored by this kernel. Remove the mand option from the mount to silence this warning. ======================================================= ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc1-syzkaller #0 Not tainted ------------------------------------------------------ syz.0.15/5397 is trying to acquire lock: ffff888116d27120 (&sb->s_type->i_mutex_key#16){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] ffff888116d27120 (&sb->s_type->i_mutex_key#16){+.+.}-{3:3}, at: ntfs_file_mmap+0x28a/0x300 fs/ntfs3/file.c:302 but task is already holding lock: ffff88810ed3a598 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:122 [inline] ffff88810ed3a598 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0xbd/0x240 mm/util.c:571 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_lock){++++}-{3:3}: gup_fast_fallback+0x138/0x1d00 mm/gup.c:3455 iov_iter_extract_user_pages lib/iov_iter.c:1583 [inline] iov_iter_extract_pages+0x1db/0x3e0 lib/iov_iter.c:1646 dio_refill_pages fs/direct-io.c:173 [inline] dio_get_page fs/direct-io.c:214 [inline] do_direct_IO fs/direct-io.c:916 [inline] __blockdev_direct_IO+0x7e7/0x17f0 fs/direct-io.c:1249 blockdev_direct_IO include/linux/fs.h:3185 [inline] ntfs_direct_IO+0x9f/0x1e0 fs/ntfs3/inode.c:803 generic_file_direct_write+0xeb/0x1d0 mm/filemap.c:3940 __generic_file_write_iter+0xa2/0x110 mm/filemap.c:4096 ntfs_file_write_iter+0x3bd/0x3d0 fs/ntfs3/file.c:1126 do_iter_readv_writev+0x2c0/0x360 vfs_writev+0x2af/0x690 fs/read_write.c:971 do_pwritev fs/read_write.c:1072 [inline] __do_sys_pwritev2 fs/read_write.c:1131 [inline] __se_sys_pwritev2+0x103/0x1a0 fs/read_write.c:1122 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x1b0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&sb->s_type->i_mutex_key#16){+.+.}-{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+0x11fe/0x2490 kernel/locking/lockdep.c:5137 lock_acquire+0xeb/0x270 kernel/locking/lockdep.c:5754 down_write+0x29/0xb0 kernel/locking/rwsem.c:1579 inode_lock include/linux/fs.h:791 [inline] ntfs_file_mmap+0x28a/0x300 fs/ntfs3/file.c:302 call_mmap include/linux/fs.h:2107 [inline] mmap_region+0x873/0x1080 mm/mmap.c:2886 do_mmap+0x616/0x980 mm/mmap.c:1397 vm_mmap_pgoff+0x113/0x240 mm/util.c:573 ksys_mmap_pgoff+0x22c/0x2d0 mm/mmap.c:1443 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x1b0 arch/x86/entry/common.c:83 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#16); lock(&mm->mmap_lock); lock(&sb->s_type->i_mutex_key#16); *** DEADLOCK *** 1 lock held by syz.0.15/5397: #0: ffff88810ed3a598 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:122 [inline] #0: ffff88810ed3a598 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0xbd/0x240 mm/util.c:571 stack backtrace: CPU: 1 PID: 5397 Comm: syz.0.15 Not tainted 6.10.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x12b/0x1d0 lib/dump_stack.c:114 check_noncircular+0x119/0x140 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+0x11fe/0x2490 kernel/locking/lockdep.c:5137 lock_acquire+0xeb/0x270 kernel/locking/lockdep.c:5754 down_write+0x29/0xb0 kernel/locking/rwsem.c:1579 inode_lock include/linux/fs.h:791 [inline] ntfs_file_mmap+0x28a/0x300 fs/ntfs3/file.c:302 call_mmap include/linux/fs.h:2107 [inline] mmap_region+0x873/0x1080 mm/mmap.c:2886 do_mmap+0x616/0x980 mm/mmap.c:1397 vm_mmap_pgoff+0x113/0x240 mm/util.c:573 ksys_mmap_pgoff+0x22c/0x2d0 mm/mmap.c:1443 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x1b0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcd27b77299 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:00007fcd2893c048 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007fcd27d05f80 RCX: 00007fcd27b77299 RDX: 00000000007fffff RSI: 0000000000003000 RDI: 0000000020000000 RBP: 00007fcd27be48e6 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fcd27d05f80 R15: 00007ffd52748dc8