igt@gem_ctx_persistence@legacy-engines-hostile@render - dmesg-warn/dmesg-fail - WARNING: possible circular locking dependency detected, is trying to acquire lock at: stop_machine.but task is already holding lock:at: i915_vma_coredump_create.isra
<6> [37.717434] Console: switching to colour dummy device 80x25
<6> [37.717706] [IGT] gem_ctx_persistence: executing
<7> [37.824699] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
<7> [37.825383] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
<7> [37.827972] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 2 created
<6> [37.828595] [IGT] gem_ctx_persistence: starting subtest legacy-engines-hostile
<6> [37.833549] [IGT] gem_ctx_persistence: starting dynamic subtest render
<7> [37.840131] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 2 created
<5> [37.863527] i915 0000:00:02.0: [drm] Resetting rcs0 for preemption time out
<4> [37.865340] irq event stamp: 3256
<4> [37.865344]
<4> [37.865358] hardirqs last enabled at (3255): [<ffffffff81aefe0f>] _raw_spin_unlock_irq+0x1f/0x40
<4> [37.865369] ======================================================
<4> [37.865379] hardirqs last disabled at (3256): [<ffffffff81ae6762>] __schedule+0x712/0xbc0
<4> [37.865387] WARNING: possible circular locking dependency detected
<4> [37.865397] softirqs last enabled at (2480): [<ffffffff81e0032d>] __do_softirq+0x32d/0x493
<4> [37.865406] 5.17.0-drmtip_1054-g004acaa6c817+ #1 Tainted: G U
<4> [37.865415] softirqs last disabled at (2473): [<ffffffff810b9606>] irq_exit_rcu+0xa6/0xe0
<4> [37.865424] ------------------------------------------------------
<4> [37.865443] kworker/0:1/10 is trying to acquire lock:
<4> [37.865451] ffffffff826485b0 (cpu_hotplug_lock){++++}-{0:0}, at: stop_machine+0x12/0x30
<4> [37.865475]
but task is already holding lock:
<4> [37.865484] ffff88812c129690 (&ggtt->error_mutex){+.+.}-{3:3}, at: i915_vma_coredump_create.isra.28+0x1b4/0x610 [i915]
<4> [37.865842]
which lock already depends on the new lock.
<4> [37.865855]
the existing dependency chain (in reverse order) is:
<4> [37.865865]
-> #4 (&ggtt->error_mutex){+.+.}-{3:3}:
<4> [37.865881] __mutex_lock+0x9d/0x920
<4> [37.865894] i915_vma_coredump_create.isra.28+0x1b4/0x610 [i915]
<4> [37.866250] intel_engine_coredump_add_vma+0x5d/0x130 [i915]
<4> [37.866607] execlists_capture_work+0x54/0x110 [i915]
<4> [37.866943] process_one_work+0x275/0x5c0
<4> [37.866955] worker_thread+0x37/0x370
<4> [37.866964] kthread+0xef/0x120
<4> [37.866972] ret_from_fork+0x22/0x30
<4> [37.866981]
-> #3 (dma_fence_map){++++}-{0:0}:
<4> [37.866996] __dma_fence_might_wait+0x3c/0xa0
<4> [37.867008] dma_resv_lockdep+0x20d/0x2c6
<4> [37.867019] do_one_initcall+0x56/0x2e0
<4> [37.867027] kernel_init_freeable+0x18f/0x1dd
<4> [37.867038] kernel_init+0x11/0x110
<4> [37.867048] ret_from_fork+0x22/0x30
<4> [37.867056]
-> #2 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}:
<4> [37.867072] fs_reclaim_acquire+0x68/0xd0
<4> [37.867082] kmem_cache_alloc_trace+0x2a/0x250
<4> [37.867091] alloc_worker.isra.20+0x16/0x50
<4> [37.867100] init_rescuer.part.28+0xa/0x90
<4> [37.867109] workqueue_init+0xb2/0x199
<4> [37.867117] kernel_init_freeable+0x78/0x1dd
<4> [37.867126] kernel_init+0x11/0x110
<4> [37.867134] ret_from_fork+0x22/0x30
<4> [37.867142]
Edited by Ravi V