igt@gem_exec_create@forked - incomplete - WARNING: possible circular locking dependency detected
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_426/fi-bsw-n3050/igt@gem_exec_create@forked.html https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_426/fi-bsw-n3050/boot14.txt
<4>[ 16.324440] ======================================================
<4>[ 16.324449] WARNING: possible circular locking dependency detected
<4>[ 16.324458] 5.5.0-rc7-gbc626bbb5b6e-drmtip_426+ #1 Not tainted
<4>[ 16.324466] ------------------------------------------------------
<4>[ 16.324474] modprobe/268 is trying to acquire lock:
<4>[ 16.324482] ffffffff9843d090 (cpu_hotplug_lock.rw_sem){++++}, at: stop_machine+0x12/0x30
<4>[ 16.324501]
but task is already holding lock:
<4>[ 16.324510] ffffa430a1b99580 (&vm->mutex){+.+.}, at: i915_vma_pin+0x117/0x11c0 [i915]
<4>[ 16.324702]
which lock already depends on the new lock.
<4>[ 16.324712]
the existing dependency chain (in reverse order) is:
<4>[ 16.324721]
-> #2 (&vm->mutex){+.+.}:
<4>[ 16.324860] i915_gem_shrinker_taints_mutex+0xa0/0xd0 [i915]
<4>[ 16.324989] i915_address_space_init+0xa9/0x170 [i915]
<4>[ 16.325116] i915_ggtt_init_hw+0x2b/0x120 [i915]
<4>[ 16.325237] i915_driver_probe+0xbe9/0x1640 [i915]
<4>[ 16.325359] i915_pci_probe+0x43/0x1b0 [i915]
<4>[ 16.325370] pci_device_probe+0x9e/0x120
<4>[ 16.325379] really_probe+0xea/0x420
<4>[ 16.325387] driver_probe_device+0x10b/0x120
<4>[ 16.325395] device_driver_attach+0x4a/0x50
<4>[ 16.325403] __driver_attach+0x97/0x130
<4>[ 16.325411] bus_for_each_dev+0x74/0xc0
<4>[ 16.325419] bus_add_driver+0x142/0x220
<4>[ 16.325427] driver_register+0x56/0xf0
<4>[ 16.325539] i915_init+0x6c/0x7c [i915]
<4>[ 16.325548] do_one_initcall+0x58/0x300
<4>[ 16.325557] do_init_module+0x56/0x1f2
<4>[ 16.325565] load_module+0x243e/0x29f0
<4>[ 16.325572] __do_sys_finit_module+0xe9/0x110
<4>[ 16.325580] do_syscall_64+0x4f/0x240
<4>[ 16.325590] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[ 16.325597]
-> #1 (fs_reclaim){+.+.}:
<4>[ 16.325610] fs_reclaim_acquire.part.117+0x24/0x30
<4>[ 16.325619] kmem_cache_alloc_trace+0x2a/0x2c0
<4>[ 16.325628] intel_cpuc_prepare+0x37/0x1a0
<4>[ 16.325637] cpuhp_invoke_callback+0x9b/0x9d0
<4>[ 16.325645] _cpu_up+0xa2/0x140
<4>[ 16.325652] do_cpu_up+0x61/0xa0
<4>[ 16.325660] smp_init+0x57/0x96
<4>[ 16.325668] kernel_init_freeable+0xac/0x195
<4>[ 16.325677] kernel_init+0x5/0x100
<4>[ 16.325685] ret_from_fork+0x3a/0x50
<4>[ 16.325691]
-> #0 (cpu_hotplug_lock.rw_sem){++++}:
<4>[ 16.325704] __lock_acquire+0x1328/0x15d0
<4>[ 16.325712] lock_acquire+0xa7/0x1c0
<4>[ 16.325719] cpus_read_lock+0x34/0xd0
<4>[ 16.325727] stop_machine+0x12/0x30
<4>[ 16.325855] bxt_vtd_ggtt_insert_entries__BKL+0x36/0x50 [i915]
<4>[ 16.325982] aliasing_gtt_bind_vma+0xc9/0x1a0 [i915]
<4>[ 16.326120] i915_vma_bind+0x22b/0x4f0 [i915]
<4>[ 16.326258] i915_vma_pin+0x1a5/0x11c0 [i915]
<4>[ 16.326384] intel_gt_init+0xd6/0xbd0 [i915]
<4>[ 16.326521] i915_gem_init+0x14d/0x2b0 [i915]
<4>[ 16.326642] i915_driver_probe+0xb35/0x1640 [i915]
<4>[ 16.326764] i915_pci_probe+0x43/0x1b0 [i915]
<4>[ 16.326773] pci_device_probe+0x9e/0x120
<4>[ 16.326782] really_probe+0xea/0x420
<4>[ 16.326789] driver_probe_device+0x10b/0x120
<4>[ 16.326797] device_driver_attach+0x4a/0x50
<4>[ 16.326805] __driver_attach+0x97/0x130
<4>[ 16.326813] bus_for_each_dev+0x74/0xc0
<4>[ 16.326820] bus_add_driver+0x142/0x220
<4>[ 16.326828] driver_register+0x56/0xf0
<4>[ 16.326941] i915_init+0x6c/0x7c [i915]
<4>[ 16.326949] do_one_initcall+0x58/0x300
<4>[ 16.326957] do_init_module+0x56/0x1f2
<4>[ 16.326965] load_module+0x243e/0x29f0
<4>[ 16.326972] __do_sys_finit_module+0xe9/0x110
<4>[ 16.326980] do_syscall_64+0x4f/0x240
<4>[ 16.326988] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[ 16.326996]
other info that might help us debug this:
<4>[ 16.327006] Chain exists of:
cpu_hotplug_lock.rw_sem --> fs_reclaim --> &vm->mutex
<4>[ 16.327021] Possible unsafe locking scenario:
<4>[ 16.327029] CPU0 CPU1
<4>[ 16.327035] ---- ----
<4>[ 16.327041] lock(&vm->mutex);
<4>[ 16.327047] lock(fs_reclaim);
<4>[ 16.327055] lock(&vm->mutex);
<4>[ 16.327063] lock(cpu_hotplug_lock.rw_sem);
<4>[ 16.327070]
*** DEADLOCK ***
````
Edited by LAKSHMINARAYANA VUDUM