ntfs3: loop0: Different NTFS sector size (4096) and media sector size (512). ntfs3: loop0: Inode r=b is not in use! ntfs3: loop0: Mark volume as dirty due to NTFS errors ntfs3: loop0: Failed to load $Extend (-116). ntfs3: loop0: Failed to initialize $Extend. ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc1-syzkaller #0 Not tainted ------------------------------------------------------ syz.0.15/3543 is trying to acquire lock: ffff888102e8e1d8 (&mm->mmap_lock){++++}-{3:3}, at: gup_fast_fallback+0xa5/0x1140 mm/gup.c:3455 but task is already holding lock: ffff8881094e4138 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: inode_trylock include/linux/fs.h:811 [inline] ffff8881094e4138 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: ntfs_file_write_iter+0x81/0x1e0 fs/ntfs3/file.c:1099 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}: down_write+0x29/0xb0 kernel/locking/rwsem.c:1579 inode_lock include/linux/fs.h:791 [inline] ntfs_file_mmap+0x19c/0x1f0 fs/ntfs3/file.c:302 call_mmap include/linux/fs.h:2107 [inline] mmap_region+0x564/0xa70 mm/mmap.c:2886 do_mmap+0x3e9/0x590 mm/mmap.c:1397 vm_mmap_pgoff+0xcd/0x1a0 mm/util.c:573 ksys_mmap_pgoff+0x182/0x200 mm/mmap.c:1443 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&mm->mmap_lock){++++}-{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 gup_fast_fallback+0xc3/0x1140 mm/gup.c:3455 iov_iter_extract_user_pages lib/iov_iter.c:1583 [inline] iov_iter_extract_pages+0x13d/0x250 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+0x4d9/0xe70 fs/direct-io.c:1249 blockdev_direct_IO include/linux/fs.h:3185 [inline] ntfs_direct_IO+0x69/0x100 fs/ntfs3/inode.c:803 generic_file_direct_write+0x71/0x140 mm/filemap.c:3940 __generic_file_write_iter+0x5c/0x90 mm/filemap.c:4096 ntfs_file_write_iter+0x1ca/0x1e0 fs/ntfs3/file.c:1126 do_iter_readv_writev+0x169/0x1b0 vfs_writev+0x1e6/0x3e0 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+0xa8/0x110 fs/read_write.c:1122 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x180 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(&sb->s_type->i_mutex_key#15); lock(&mm->mmap_lock); lock(&sb->s_type->i_mutex_key#15); rlock(&mm->mmap_lock); *** DEADLOCK *** 2 locks held by syz.0.15/3543: #0: ffff88810df7a408 (sb_writers#12){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2854 [inline] #0: ffff88810df7a408 (sb_writers#12){.+.+}-{0:0}, at: vfs_writev+0x1bd/0x3e0 fs/read_write.c:969 #1: ffff8881094e4138 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: inode_trylock include/linux/fs.h:811 [inline] #1: ffff8881094e4138 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: ntfs_file_write_iter+0x81/0x1e0 fs/ntfs3/file.c:1099 stack backtrace: CPU: 0 PID: 3543 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+0xa3/0x100 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 gup_fast_fallback+0xc3/0x1140 mm/gup.c:3455 iov_iter_extract_user_pages lib/iov_iter.c:1583 [inline] iov_iter_extract_pages+0x13d/0x250 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+0x4d9/0xe70 fs/direct-io.c:1249 blockdev_direct_IO include/linux/fs.h:3185 [inline] ntfs_direct_IO+0x69/0x100 fs/ntfs3/inode.c:803 generic_file_direct_write+0x71/0x140 mm/filemap.c:3940 __generic_file_write_iter+0x5c/0x90 mm/filemap.c:4096 ntfs_file_write_iter+0x1ca/0x1e0 fs/ntfs3/file.c:1126 do_iter_readv_writev+0x169/0x1b0 vfs_writev+0x1e6/0x3e0 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+0xa8/0x110 fs/read_write.c:1122 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f76e3375f19 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:00007f76e4128048 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f76e3505f60 RCX: 00007f76e3375f19 RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000005 RBP: 00007f76e33e4e68 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000007000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f76e3505f60 R15: 00007fff49771ea8