====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.2.157/6854 is trying to acquire lock: ffff88806412aee0 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1247 [inline] ffff88806412aee0 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_fallocate+0x891/0x1080 fs/ntfs3/file.c:599 but task is already holding lock: ffff88806412b378 (mapping.invalidate_lock#3){++++}-{4:4}, at: filemap_invalidate_lock include/linux/fs.h:1080 [inline] ffff88806412b378 (mapping.invalidate_lock#3){++++}-{4:4}, at: ntfs_fallocate+0x39c/0x1080 fs/ntfs3/file.c:520 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (mapping.invalidate_lock#3){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 filemap_invalidate_lock_shared include/linux/fs.h:1090 [inline] filemap_fault+0x6e0/0x13c0 mm/filemap.c:3585 __do_fault+0x138/0x2a0 mm/memory.c:5503 do_read_fault mm/memory.c:5938 [inline] do_fault mm/memory.c:6072 [inline] do_pte_missing+0x1828/0x28f0 mm/memory.c:4638 handle_pte_fault mm/memory.c:6496 [inline] __handle_mm_fault mm/memory.c:6645 [inline] handle_mm_fault+0xe81/0x2690 mm/memory.c:6814 do_user_addr_fault+0x746/0x1340 arch/x86/mm/fault.c:1394 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 do_strncpy_from_user lib/strncpy_from_user.c:-1 [inline] strncpy_from_user+0xb7/0x2c0 lib/strncpy_from_user.c:130 do_getname+0x77/0x250 fs/namei.c:198 class_filename_flags_constructor include/linux/fs.h:2587 [inline] do_sys_openat2+0xcc/0x200 fs/open.c:1416 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&mm->mmap_lock){++++}-{4:4}: down_read_killable+0xa4/0x220 kernel/locking/rwsem.c:1599 mmap_read_lock_killable+0x1d/0x70 include/linux/mmap_lock.h:609 get_mmap_lock_carefully mm/mmap_lock.c:450 [inline] lock_mm_and_find_vma+0x2d6/0x340 mm/mmap_lock.c:501 do_user_addr_fault+0x343/0x1340 arch/x86/mm/fault.c:1366 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 stac arch/x86/include/asm/smap.h:-1 [inline] filldir+0x29f/0x630 fs/readdir.c:286 dir_emit include/linux/fs.h:3608 [inline] ntfs_dir_emit fs/ntfs3/dir.c:388 [inline] ntfs_read_hdr+0x8a7/0xc10 fs/ntfs3/dir.c:429 ntfs_readdir+0x9ab/0xf70 fs/ntfs3/dir.c:589 iterate_dir+0x2f1/0x4e0 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:319 [inline] __se_sys_getdents+0xf1/0x270 fs/readdir.c:304 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ni->ni_lock/5){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3181 [inline] check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5253 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886 __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 ni_lock fs/ntfs3/ntfs_fs.h:1247 [inline] ntfs_fallocate+0x891/0x1080 fs/ntfs3/file.c:599 vfs_fallocate+0x663/0x7f0 fs/open.c:338 ksys_fallocate fs/open.c:362 [inline] __do_sys_fallocate fs/open.c:367 [inline] __se_sys_fallocate fs/open.c:365 [inline] __x64_sys_fallocate+0xbf/0x110 fs/open.c:365 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 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#3 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(mapping.invalidate_lock#3); lock(&mm->mmap_lock); lock(mapping.invalidate_lock#3); lock(&ni->ni_lock/5); *** DEADLOCK *** locks held by syz.2.157/6854: 3, last CPU#0: #0: ffff888060248510 (sb_writers#16){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2754 [inline] #0: ffff888060248510 (sb_writers#16){.+.+}-{0:0}, at: vfs_fallocate+0x5e9/0x7f0 fs/open.c:337 #1: ffff88806412b1a8 (&sb->s_type->i_mutex_key#26){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1025 [inline] #1: ffff88806412b1a8 (&sb->s_type->i_mutex_key#26){+.+.}-{4:4}, at: ntfs_fallocate+0x2d7/0x1080 fs/ntfs3/file.c:506 #2: ffff88806412b378 (mapping.invalidate_lock#3){++++}-{4:4}, at: filemap_invalidate_lock include/linux/fs.h:1080 [inline] #2: ffff88806412b378 (mapping.invalidate_lock#3){++++}-{4:4}, at: ntfs_fallocate+0x39c/0x1080 fs/ntfs3/file.c:520 stack backtrace: CPU: 0 UID: 0 PID: 6854 Comm: syz.2.157 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2059 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2191 check_prev_add kernel/locking/lockdep.c:3181 [inline] check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5253 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886 __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 ni_lock fs/ntfs3/ntfs_fs.h:1247 [inline] ntfs_fallocate+0x891/0x1080 fs/ntfs3/file.c:599 vfs_fallocate+0x663/0x7f0 fs/open.c:338 ksys_fallocate fs/open.c:362 [inline] __do_sys_fallocate fs/open.c:367 [inline] __se_sys_fallocate fs/open.c:365 [inline] __x64_sys_fallocate+0xbf/0x110 fs/open.c:365 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8b57a2e0d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8b55c86028 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f8b57cb5fa0 RCX: 00007f8b57a2e0d9 RDX: 0000000000004000 RSI: 0000000000000008 RDI: 0000000000000004 RBP: 00007f8b57ac5024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8b57cb6038 R14: 00007f8b57cb5fa0 R15: 00007ffd1f5f45f8