igt@gem_set_tiling_vs_blt@untiled-to-tiled - dmesg-warn - WARNING: possible circular locking dependency detected, is trying to acquire lock at: unmap_mapping_pages, but task is already holding lock at: i915_gem_object_release_mmap
<4> [132.810318] ======================================================
<4> [132.810322] WARNING: possible circular locking dependency detected
<4> [132.810327] 5.4.0-rc8-gebfb3e054280-drmtip_410+ #1 Tainted: G U
<4> [132.810332] ------------------------------------------------------
<4> [132.810336] gem_set_tiling_/1086 is trying to acquire lock:
<4> [132.810340] ffff9c4bdfe7c308 (&mapping->i_mmap_rwsem){++++}, at: unmap_mapping_pages+0x48/0x130
<4> [132.810350]
but task is already holding lock:
<4> [132.810354] ffff9c4be93b93c0 (&vm->mutex){+.+.}, at: i915_gem_object_release_mmap+0x30/0x70 [i915]
<4> [132.810502]
which lock already depends on the new lock.
<4> [132.810506]
the existing dependency chain (in reverse order) is:
<4> [132.810510]
-> #2 (&vm->mutex){+.+.}:
<4> [132.810517] __mutex_lock+0x9a/0x9d0
<4> [132.810577] i915_vma_unbind+0x21/0x50 [i915]
<4> [132.810637] i915_gem_object_unbind+0x1b1/0x3d0 [i915]
<4> [132.810694] userptr_mn_invalidate_range_start+0x57/0x100 [i915]
<4> [132.810701] __mmu_notifier_invalidate_range_start+0x9e/0x190
<4> [132.810707] unmap_vmas+0x143/0x150
<4> [132.810711] unmap_region+0xa3/0x100
<4> [132.810714] __do_munmap+0x26d/0x490
<4> [132.810718] __vm_munmap+0x66/0xc0
<4> [132.810721] __x64_sys_munmap+0x12/0x20
<4> [132.810726] do_syscall_64+0x4f/0x210
<4> [132.810730] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [132.810734]
-> #1 (mmu_notifier_invalidate_range_start){+.+.}:
<4> [132.810741] page_mkclean_one+0xda/0x210
<4> [132.810745] rmap_walk_file+0xff/0x260
<4> [132.810749] page_mkclean+0x9f/0xb0
<4> [132.810753] clear_page_dirty_for_io+0xa2/0x300
<4> [132.810759] mpage_submit_page+0x1a/0x70
<4> [132.810762] mpage_process_page_bufs+0xe7/0x110
<4> [132.810767] mpage_prepare_extent_to_map+0x1d2/0x2b0
<4> [132.810771] ext4_writepages+0x592/0x1230
<4> [132.810775] do_writepages+0x46/0xe0
<4> [132.810780] __filemap_fdatawrite_range+0xc6/0x100
<4> [132.810784] file_write_and_wait_range+0x3c/0x90
<4> [132.810789] ext4_sync_file+0x154/0x500
<4> [132.810794] do_fsync+0x33/0x60
<4> [132.810797] __x64_sys_fsync+0xb/0x10
<4> [132.810801] do_syscall_64+0x4f/0x210
<4> [132.810805] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [132.810809]
-> #0 (&mapping->i_mmap_rwsem){++++}:
<4> [132.810815] __lock_acquire+0x1328/0x15d0
<4> [132.810819] lock_acquire+0xa7/0x1c0
<4> [132.810823] down_write+0x33/0x70
<4> [132.810826] unmap_mapping_pages+0x48/0x130
<4> [132.810886] i915_vma_revoke_mmap.part.38+0x66/0x190 [i915]
<4> [132.810943] __i915_gem_object_release_mmap_gtt+0x51/0x130 [i915]
<4> [132.811000] i915_gem_object_release_mmap+0x42/0x70 [i915]
<4> [132.811058] i915_gem_object_set_tiling+0x174/0x770 [i915]
<4> [132.811115] i915_gem_set_tiling_ioctl+0x21e/0x290 [i915]
<4> [132.811122] drm_ioctl_kernel+0xa7/0xf0
<4> [132.811126] drm_ioctl+0x2e1/0x390
<4> [132.811130] do_vfs_ioctl+0xa0/0x6f0
<4> [132.811134] ksys_ioctl+0x35/0x60
<4> [132.811138] __x64_sys_ioctl+0x11/0x20
<4> [132.811142] do_syscall_64+0x4f/0x210
<4> [132.811145] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [132.811149]
other info that might help us debug this:
<4> [132.811154] Chain exists of:
&mapping->i_mmap_rwsem --> mmu_notifier_invalidate_range_start --> &vm->mutex
<4> [132.811164] Possible unsafe locking scenario:
<4> [132.811168] CPU0 CPU1
<4> [132.811171] ---- ----
<4> [132.811174] lock(&vm->mutex);
<4> [132.811177] lock(mmu_notifier_invalidate_range_start);
<4> [132.811183] lock(&vm->mutex);
<4> [132.811187] lock(&mapping->i_mmap_rwsem);
<4> [132.811191]
*** DEADLOCK ***