======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.7.339/7836 is trying to acquire lock:
ffff88816ccdf180 (&mm->mmap_lock){++++}-{4:4}, at: __might_fault+0xb0/0x130

but task is already holding lock:
ffff888115b95fa8 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_fiemap+0x10a/0x1a0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&ni->ni_lock#3/5){+.+.}-{4:4}:
       __mutex_lock+0x187/0x1350
       attr_data_get_block+0x2ec/0x1ec0
       ntfs_file_mmap_prepare+0x53f/0x850
       mmap_region+0xb2b/0x1d10
       do_mmap+0xc45/0x10d0
       vm_mmap_pgoff+0x2a6/0x4d0
       ksys_mmap_pgoff+0x51f/0x760
       do_syscall_64+0xec/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&mm->mmap_lock){++++}-{4:4}:
       __lock_acquire+0x15a6/0x2cf0
       lock_acquire+0x107/0x340
       __might_fault+0xcc/0x130
       _copy_to_user+0x2c/0xb0
       fiemap_fill_next_extent+0x1c0/0x390
       ni_fiemap+0x89c/0xbf0
       ntfs_fiemap+0x11d/0x1a0
       do_vfs_ioctl+0x1173/0x1430
       __se_sys_ioctl+0x82/0x170
       do_syscall_64+0xec/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&ni->ni_lock#3/5);
                               lock(&mm->mmap_lock);
                               lock(&ni->ni_lock#3/5);
  rlock(&mm->mmap_lock);

 *** DEADLOCK ***

1 lock held by syz.7.339/7836:
 #0: ffff888115b95fa8 (&ni->ni_lock#3/5){+.+.}-{4:4}, at: ntfs_fiemap+0x10a/0x1a0

stack backtrace:
CPU: 1 UID: 0 PID: 7836 Comm: syz.7.339 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+0xe8/0x150
 print_circular_bug+0x2e2/0x300
 check_noncircular+0x12e/0x150
 __lock_acquire+0x15a6/0x2cf0
 lock_acquire+0x107/0x340
 __might_fault+0xcc/0x130
 _copy_to_user+0x2c/0xb0
 fiemap_fill_next_extent+0x1c0/0x390
 ni_fiemap+0x89c/0xbf0
 ntfs_fiemap+0x11d/0x1a0
 do_vfs_ioctl+0x1173/0x1430
 __se_sys_ioctl+0x82/0x170
 do_syscall_64+0xec/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f820bd8f7c9
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:00007f820cb5f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f820bfe6090 RCX: 00007f820bd8f7c9
RDX: 0000200000000300 RSI: 00000000c020660b RDI: 000000000000000a
RBP: 00007f820bdf297f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f820bfe6128 R14: 00007f820bfe6090 R15: 00007ffdb45eeeb8
 </TASK>
