igt@kms_vblank@pipe-a-query-busy-hang - abort - WARNING: possible circular locking dependency detected
<7> [635.673883] [drm:drm_mode_setcrtc [drm]] [CRTC:233:pipe D]
<7> [635.719411] xe 0000:03:00.0: [drm:i915_fifo_underrun_reset_write [xe]] Re-arming FIFO underruns on pipe A
<7> [635.738479] xe 0000:03:00.0: [drm:xe_migrate_clear [xe]] Pass 0, size: 65536
<4> [635.738958]
<4> [635.738964] ======================================================
<4> [635.738967] WARNING: possible circular locking dependency detected
<4> [635.738970] 6.5.0-rc7-xe #1 Not tainted
<4> [635.738974] ------------------------------------------------------
<4> [635.738977] kms_vblank/1863 is trying to acquire lock:
<4> [635.738981] ffff88811c1f8c78 (&dev->object_name_lock){+.+.}-{3:3}, at: drm_gem_handle_create+0x32/0x50 [drm]
<4> [635.739089]
but task is already holding lock:
<4> [635.739093] ffff888156e11138 (reservation_ww_class_mutex){+.+.}-{3:3}, at: xe_gem_create_ioctl+0x2ea/0x550 [xe]
<4> [635.739273]
which lock already depends on the new lock.
<4> [635.739277]
the existing dependency chain (in reverse order) is:
<4> [635.739280]
-> #1 (reservation_ww_class_mutex){+.+.}-{3:3}:
<4> [635.739288] lock_acquire+0x169/0x3d0
<4> [635.739294] __ww_mutex_lock.constprop.0+0x164/0x1e60
<4> [635.739300] ww_mutex_lock_interruptible+0x42/0x1a0
<4> [635.739305] drm_gem_shmem_pin+0x4b/0x140 [drm_shmem_helper]
<4> [635.739317] dma_buf_dynamic_attach+0x101/0x430
<4> [635.739323] xe_gem_prime_import+0xcc/0x2e0 [xe]
<4> [635.739499] drm_prime_fd_to_handle_ioctl+0x184/0x2e0 [drm]
<4> [635.739594] drm_ioctl_kernel+0x16f/0x250 [drm]
<4> [635.739693] drm_ioctl+0x35e/0x620 [drm]
<4> [635.739789] __x64_sys_ioctl+0xb7/0xf0
<4> [635.739794] do_syscall_64+0x3c/0x90
<4> [635.739799] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
<4> [635.739805]
-> #0 (&dev->object_name_lock){+.+.}-{3:3}:
<4> [635.739813] check_prev_add+0x1ba/0x14a0
<4> [635.739818] __lock_acquire+0x203e/0x2ff0
<4> [635.739823] lock_acquire+0x169/0x3d0
<4> [635.739827] __mutex_lock+0x124/0x1310
<4> [635.739832] drm_gem_handle_create+0x32/0x50 [drm]
<4> [635.739927] xe_gem_create_ioctl+0x1d3/0x550 [xe]
<4> [635.740102] drm_ioctl_kernel+0x16f/0x250 [drm]
<4> [635.740197] drm_ioctl+0x35e/0x620 [drm]
<4> [635.740293] __x64_sys_ioctl+0xb7/0xf0
<4> [635.740297] do_syscall_64+0x3c/0x90
<4> [635.740302] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
<4> [635.740307]
other info that might help us debug this:
<4> [635.740311] Possible unsafe locking scenario:
<4> [635.740314] CPU0 CPU1
<4> [635.740317] ---- ----
<4> [635.740319] lock(reservation_ww_class_mutex);
<4> [635.740325] lock(&dev->object_name_lock);
<4> [635.740330] lock(reservation_ww_class_mutex);
<4> [635.740336] lock(&dev->object_name_lock);
<4> [635.740341]
*** DEADLOCK ***
<4> [635.740344] 1 lock held by kms_vblank/1863:
<4> [635.740347] #0: ffff888156e11138 (reservation_ww_class_mutex){+.+.}-{3:3}, at: xe_gem_create_ioctl+0x2ea/0x550 [xe]
<4> [635.740529]
stack backtrace:
<4> [635.740532] CPU: 4 PID: 1863 Comm: kms_vblank Not tainted 6.5.0-rc7-xe #1
<4> [635.740538] Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWR1.R00.X220.B00.2103302221 03/30/2021
<4> [635.740542] Call Trace:
<4> [635.740545] <TASK>
<4> [635.740549] dump_stack_lvl+0x64/0xb0
<4> [635.740555] check_noncircular+0x267/0x2b0
<4> [635.740561] ? __pfx_check_noncircular+0x10/0x10
<4> [635.740566] ? mark_lock.part.0+0x10a/0x1470
<4> [635.740571] ? xe_device_mem_access_put+0x57/0x230 [xe]
<4> [635.740750] check_prev_add+0x1ba/0x14a0
<4> [635.740757] __lock_acquire+0x203e/0x2ff0
<4> [635.740764] ? __pfx___lock_acquire+0x10/0x10
<4> [635.740769] ? check_chain_key+0x224/0x2d0
<4> [635.740776] lock_acquire+0x169/0x3d0
<4> [635.740780] ? drm_gem_handle_create+0x32/0x50 [drm]
<4> [635.740877] ? __pfx_lock_acquire+0x10/0x10
<4> [635.740882] ? do_raw_spin_unlock+0xa7/0x140