======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.9.1620/10644 is trying to acquire lock:
ffff8881a80b9e20 (&ni->ni_lock#2/5){+.+.}-{4:4}, at: ntfs_fallocate+0x57a/0x10b0

but task is already holding lock:
ffff8881a80ba258 (mapping.invalidate_lock#11){++++}-{4:4}, at: ntfs_fallocate+0x3b8/0x10b0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (mapping.invalidate_lock#11){++++}-{4:4}:
       lock_acquire+0x120/0x360
       down_read+0x46/0x2e0
       filemap_fault+0x5d0/0x12b0
       __do_fault+0x138/0x390
       __handle_mm_fault+0x35dc/0x5440
       handle_mm_fault+0x40a/0x8e0
       __get_user_pages+0x1650/0x29f0
       populate_vma_page_range+0x29f/0x3a0
       __mm_populate+0x24c/0x380
       vm_mmap_pgoff+0x387/0x4d0
       ksys_mmap_pgoff+0x51f/0x760
       do_syscall_64+0xfa/0xfa0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&mm->mmap_lock){++++}-{4:4}:
       lock_acquire+0x120/0x360
       __might_fault+0xcc/0x130
       _copy_to_user+0x2c/0xb0
       fiemap_fill_next_extent+0x1c0/0x390
       ni_fiemap+0x7e5/0xbf0
       ntfs_fiemap+0x11d/0x1a0
       do_vfs_ioctl+0x1173/0x1430
       __se_sys_ioctl+0x82/0x170
       do_syscall_64+0xfa/0xfa0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&ni->ni_lock#2/5){+.+.}-{4:4}:
       validate_chain+0xb9b/0x2140
       __lock_acquire+0xab9/0xd20
       lock_acquire+0x120/0x360
       __mutex_lock+0x187/0x1350
       ntfs_fallocate+0x57a/0x10b0
       vfs_fallocate+0x669/0x7e0
       __x64_sys_fallocate+0xc0/0x110
       do_syscall_64+0xfa/0xfa0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &ni->ni_lock#2/5 --> &mm->mmap_lock --> mapping.invalidate_lock#11

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(mapping.invalidate_lock#11);
                               lock(&mm->mmap_lock);
                               lock(mapping.invalidate_lock#11);
  lock(&ni->ni_lock#2/5);

 *** DEADLOCK ***

3 locks held by syz.9.1620/10644:
 #0: ffff8881173a2420 (sb_writers#14){.+.+}-{0:0}, at: vfs_fallocate+0x5f0/0x7e0
 #1: ffff8881a80ba0b8 (&sb->s_type->i_mutex_key#25){+.+.}-{4:4}, at: ntfs_fallocate+0x2ee/0x10b0
 #2: ffff8881a80ba258 (mapping.invalidate_lock#11){++++}-{4:4}, at: ntfs_fallocate+0x3b8/0x10b0

stack backtrace:
CPU: 0 UID: 0 PID: 10644 Comm: syz.9.1620 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 print_circular_bug+0x2ee/0x310
 check_noncircular+0x134/0x160
 validate_chain+0xb9b/0x2140
 __lock_acquire+0xab9/0xd20
 lock_acquire+0x120/0x360
 __mutex_lock+0x187/0x1350
 ntfs_fallocate+0x57a/0x10b0
 vfs_fallocate+0x669/0x7e0
 __x64_sys_fallocate+0xc0/0x110
 do_syscall_64+0xfa/0xfa0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f899918efc9
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:00007f89973f6038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00007f89993e6090 RCX: 00007f899918efc9
RDX: 000000000000000c RSI: 0000000000000003 RDI: 0000000000000004
RBP: 00007f8999211f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000008000c62 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f89993e6128 R14: 00007f89993e6090 R15: 00007fff33d26df8
 </TASK>
