BFS-fs: bfs_fill_super(): Last block not available on loop9: 65600 loop9: detected capacity change from 0 to 4096 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.9.305/8122 is trying to acquire lock: ffff888063302f10 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline] ffff888063302f10 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_fallocate+0x8ec/0x10b0 fs/ntfs3/file.c:707 but task is already holding lock: ffff888063303398 (mapping.invalidate_lock#6){++++}-{4:4}, at: filemap_invalidate_lock include/linux/fs.h:1082 [inline] ffff888063303398 (mapping.invalidate_lock#6){++++}-{4:4}, at: ntfs_fallocate+0x3be/0x10b0 fs/ntfs3/file.c:619 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (mapping.invalidate_lock#6){++++}-{4:4}: down_read+0x97/0x1f0 kernel/locking/rwsem.c:1537 filemap_invalidate_lock_shared include/linux/fs.h:1092 [inline] filemap_fault+0x5cc/0x12b0 mm/filemap.c:3537 __do_fault+0x138/0x390 mm/memory.c:5320 do_read_fault mm/memory.c:5755 [inline] do_fault mm/memory.c:5889 [inline] do_pte_missing+0x18ca/0x27a0 mm/memory.c:4401 handle_pte_fault mm/memory.c:6273 [inline] __handle_mm_fault mm/memory.c:6411 [inline] handle_mm_fault+0xcc1/0x1330 mm/memory.c:6580 do_user_addr_fault+0x764/0x1380 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x71/0xd0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:68 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:141 [inline] _inline_copy_from_user include/linux/uaccess.h:185 [inline] _copy_from_user+0x7a/0xb0 lib/usercopy.c:18 copy_from_user include/linux/uaccess.h:223 [inline] copy_mount_options fs/namespace.c:3904 [inline] __do_sys_mount fs/namespace.c:4219 [inline] __se_sys_mount+0x18b/0x410 fs/namespace.c:4201 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&mm->mmap_lock){++++}-{4:4}: __might_fault+0xcc/0x130 mm/memory.c:7174 _inline_copy_to_user include/linux/uaccess.h:201 [inline] _copy_to_user+0x2c/0xb0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:236 [inline] fiemap_fill_next_extent+0x1c0/0x390 fs/ioctl.c:144 ni_fiemap+0x89c/0xbf0 fs/ntfs3/frecord.c:2009 ntfs_fiemap+0x11d/0x1a0 fs/ntfs3/file.c:1419 ioctl_fiemap fs/ioctl.c:219 [inline] do_vfs_ioctl+0x1188/0x1440 fs/ioctl.c:531 __do_sys_ioctl fs/ioctl.c:595 [inline] __se_sys_ioctl+0x82/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ni->ni_lock/5){+.+.}-{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+0x15a6/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x107/0x340 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:533 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:552 ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline] ntfs_fallocate+0x8ec/0x10b0 fs/ntfs3/file.c:707 vfs_fallocate+0x672/0x7f0 fs/open.c:339 ksys_fallocate fs/open.c:363 [inline] __do_sys_fallocate fs/open.c:368 [inline] __se_sys_fallocate fs/open.c:366 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:366 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &ni->ni_lock/5 --> &mm->mmap_lock --> mapping.invalidate_lock#6 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(mapping.invalidate_lock#6); lock(&mm->mmap_lock); lock(mapping.invalidate_lock#6); lock(&ni->ni_lock/5); *** DEADLOCK *** 3 locks held by syz.9.305/8122: #0: ffff88801f376480 (sb_writers#22){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2681 [inline] #0: ffff88801f376480 (sb_writers#22){.+.+}-{0:0}, at: vfs_fallocate+0x5f9/0x7f0 fs/open.c:338 #1: ffff8880633031c8 (&sb->s_type->i_mutex_key#31){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline] #1: ffff8880633031c8 (&sb->s_type->i_mutex_key#31){+.+.}-{4:4}, at: ntfs_fallocate+0x2f1/0x10b0 fs/ntfs3/file.c:605 #2: ffff888063303398 (mapping.invalidate_lock#6){++++}-{4:4}, at: filemap_invalidate_lock include/linux/fs.h:1082 [inline] #2: ffff888063303398 (mapping.invalidate_lock#6){++++}-{4:4}, at: ntfs_fallocate+0x3be/0x10b0 fs/ntfs3/file.c:619 stack backtrace: CPU: 1 UID: 0 PID: 8122 Comm: syz.9.305 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2043 check_noncircular+0x12e/0x150 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+0x15a6/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x107/0x340 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:533 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:552 ni_lock fs/ntfs3/ntfs_fs.h:1127 [inline] ntfs_fallocate+0x8ec/0x10b0 fs/ntfs3/file.c:707 vfs_fallocate+0x672/0x7f0 fs/open.c:339 ksys_fallocate fs/open.c:363 [inline] __do_sys_fallocate fs/open.c:368 [inline] __se_sys_fallocate fs/open.c:366 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:366 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd1704cf749 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:00007fd16e736038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007fd170725fa0 RCX: 00007fd1704cf749 RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000009 RBP: 00007fd170553f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000008000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd170726038 R14: 00007fd170725fa0 R15: 00007ffc78a8aa28