igt@gem_tiled_wb|igt@gem_tiled_wc - dmesg-warn - is trying to acquire lock at: unmap_mapping_pages, but task is already holding lock at: i915_vma_release
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5354/shard-snb5/igt@gem_tiled_wb.html
<6> [31.074906] Console: switching to colour dummy device 80x25
<6> [31.074958] [IGT] gem_tiled_wb: executing
<4> [39.437001]
<4> [39.437006] ======================================================
<4> [39.437008] WARNING: possible circular locking dependency detected
<4> [39.437012] 5.5.0-rc3-CI-CI_DRM_7653+ #1 Tainted: G U
<4> [39.437014] ------------------------------------------------------
<4> [39.437017] kworker/u16:1/60 is trying to acquire lock:
<4> [39.437020] ffff888216c12568 (&mapping->i_mmap_rwsem){++++}, at: unmap_mapping_pages+0x48/0x130
<4> [39.437028]
but task is already holding lock:
<4> [39.437030] ffff888214309580 (&vm->mutex){+.+.}, at: i915_vma_release+0xf1/0x220 [i915]
<6> [39.437089] [IGT] gem_tiled_wb: exiting, ret=0
<4> [39.437094]
which lock already depends on the new lock.
<4> [39.437097]
the existing dependency chain (in reverse order) is:
<4> [39.437100]
-> #2 (&vm->mutex){+.+.}:
<4> [39.437105] __mutex_lock+0x9a/0x9c0
<4> [39.437156] i915_vma_unbind+0x31/0x60 [i915]
<4> [39.437212] i915_gem_object_unbind+0x1dc/0x400 [i915]
<4> [39.437267] userptr_mn_invalidate_range_start+0xdd/0x190 [i915]
<5> [39.437268] Setting dangerous option reset - tainting kernel
<4> [39.437279] __mmu_notifier_invalidate_range_start+0x148/0x250
<4> [39.437282] unmap_vmas+0x13e/0x150
<4> [39.437285] unmap_region+0xa3/0x100
<4> [39.437287] __do_munmap+0x26d/0x490
<4> [39.437290] __vm_munmap+0x66/0xc0
<4> [39.437293] __x64_sys_munmap+0x12/0x20
<4> [39.437297] do_syscall_64+0x4f/0x220
<4> [39.437300] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [39.437302]
-> #1 (mmu_notifier_invalidate_range_start){+.+.}:
<4> [39.437307] page_mkclean_one+0xda/0x210
<4> [39.437309] rmap_walk_file+0xff/0x260
<4> [39.437312] page_mkclean+0x9f/0xb0
<4> [39.437316] clear_page_dirty_for_io+0xa2/0x2f0
<4> [39.437320] mpage_submit_page+0x1a/0x70
<4> [39.437323] mpage_process_page_bufs+0xe7/0x110
<4> [39.437326] mpage_prepare_extent_to_map+0x1d2/0x2b0
<4> [39.437337] ext4_writepages+0x5ba/0x12b0
<4> [39.437340] do_writepages+0x46/0xe0
<4> [39.437343] __filemap_fdatawrite_range+0xc6/0x100
<4> [39.437346] file_write_and_wait_range+0x3c/0x90
<4> [39.437348] ext4_sync_file+0x1a4/0x540
<4> [39.437351] do_fsync+0x33/0x60
<4> [39.437361] __x64_sys_fsync+0xb/0x10
<4> [39.437372] do_syscall_64+0x4f/0x220
<4> [39.437376] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [39.437379]
-> #0 (&mapping->i_mmap_rwsem){++++}:
<4> [39.437386] __lock_acquire+0x1328/0x15d0
<4> [39.437390] lock_acquire+0xa7/0x1c0
<4> [39.437394] down_write+0x33/0x70
<4> [39.437398] unmap_mapping_pages+0x48/0x130
<4> [39.437456] i915_vma_revoke_mmap.part.38+0x66/0x190 [i915]
<4> [39.437512] fence_update+0xc7/0x280 [i915]
<4> [39.437569] __i915_vma_unbind.part.40+0x1bb/0x510 [i915]
<4> [39.437626] i915_vma_release+0x101/0x220 [i915]
<4> [39.437679] __i915_gem_free_objects+0xe9/0x4e0 [i915]
<4> [39.437689] process_one_work+0x26a/0x620
<4> [39.437695] worker_thread+0x37/0x380
<4> [39.437700] kthread+0x119/0x130
<4> [39.437706] ret_from_fork+0x3a/0x50
<4> [39.437710]
other info that might help us debug this:
<4> [39.437717] Chain exists of:
&mapping->i_mmap_rwsem --> mmu_notifier_invalidate_range_start --> &vm->mutex
<4> [39.437731] Possible unsafe locking scenario:
<4> [39.437736] CPU0 CPU1
<4> [39.437739] ---- ----
<4> [39.437742] lock(&vm->mutex);
<4> [39.437745] lock(mmu_notifier_invalidate_range_start);
<4> [39.437750] lock(&vm->mutex);
<4> [39.437754] lock(&mapping->i_mmap_rwsem);
<4> [39.437758]
*** DEADLOCK ***
<4> [39.437763] 3 locks held by kworker/u16:1/60:
<4> [39.437766] #0: ffff888217607b28 ((wq_completion)i915){+.+.}, at: process_one_work+0x1de/0x620
<4> [39.437773] #1: ffffc90000243e78 ((work_completion)(&i915->mm.free_work)){+.+.}, at: process_one_work+0x1de/0x620
<4> [39.437781] #2: ffff888214309580 (&vm->mutex){+.+.}, at: i915_vma_release+0xf1/0x220 [i915]
<4> [39.437844]
stack backtrace:
<4> [39.437849] CPU: 4 PID: 60 Comm: kworker/u16:1 Tainted: G U 5.5.0-rc3-CI-CI_DRM_7653+ #1
<4> [39.437855] Hardware name: Dell Inc. XPS 8300 /0Y2MRG, BIOS A06 10/17/2011
<4> [39.437909] Workqueue: i915 __i915_gem_free_work [i915]
<4> [39.437914] Call Trace:
<4> [39.437920] dump_stack+0x71/0x9b
<4> [39.437925] check_noncircular+0x19b/0x1c0
<4> [39.437930] ? __lock_acquire+0x1328/0x15d0
<4> [39.437934] __lock_acquire+0x1328/0x15d0
<4> [39.437939] lock_acquire+0xa7/0x1c0
<4> [39.437943] ? unmap_mapping_pages+0x48/0x130
<4> [39.437948] down_write+0x33/0x70
<4> [39.437951] ? unmap_mapping_pages+0x48/0x130
<4> [39.437955] unmap_mapping_pages+0x48/0x130
<4> [39.438013] i915_vma_revoke_mmap.part.38+0x66/0x190 [i915]
<4> [39.438070] fence_update+0xc7/0x280 [i915]
<4> [39.438128] __i915_vma_unbind.part.40+0x1bb/0x510 [i915]
<4> [39.438185] i915_vma_release+0x101/0x220 [i915]
<4> [39.438237] __i915_gem_free_objects+0xe9/0x4e0 [i915]
<4> [39.438243] process_one_work+0x26a/0x620
<4> [39.438248] worker_thread+0x37/0x380
<4> [39.438252] ? process_one_work+0x620/0x620
<4> [39.438256] kthread+0x119/0x130
<4> [39.438259] ? kthread_park+0x80/0x80
<4> [39.438263] ret_from_fork+0x3a/0x50
<7> [39.448926] [drm:intel_fbc_enable [i915]] reserved 6291456 bytes of contiguous stolen space for FBC, threshold: 1
<7> [39.448979] [drm:intel_fbc_enable [i915]] Enabling FBC on pipe A
<7> [39.462124] [drm:__intel_fbc_disable [i915]] Disabling FBC on pipe A
<7> [39.462721] [drm:intel_fbc_enable [i915]] reserved 6291456 bytes of contiguous stolen space for FBC, threshold: 1
<7> [39.462793] [drm:intel_fbc_enable [i915]] Enabling FBC on pipe A
<7> [39.478820] [drm:__intel_fbc_disable [i915]] Disabling FBC on pipe A
<6> [39.478916] Console: switching to colour frame buffer device 128x48
<7> [39.479111] [drm:intel_fbc_enable [i915]] reserved 6291456 bytes of contiguous stolen space for FBC, threshold: 1
<7> [39.479160] [drm:intel_fbc_enable [i915]] Enabling FBC on pipe A
<7> [39.495657] [drm:__intel_fbc_disable [i915]] Disabling FBC on pipe A
````