igt@perf_pmu@cpu-hotplug - dmesg-warn - WARNING: possible circular locking dependency detected, is trying to acquire lock at: kernfs_remove_by_name_ns, but task is already holding lock at: cpuhp_thread_fun
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7538/shard-tglb9/igt@perf_pmu@cpu-hotplug.html
<4> [739.167940] ======================================================
<4> [739.167944] WARNING: possible circular locking dependency detected
<4> [739.167950] 5.5.0-rc1-CI-CI_DRM_7538+ #1 Tainted: G U
<4> [739.167954] ------------------------------------------------------
<4> [739.167959] cpuhp/0/13 is trying to acquire lock:
<4> [739.167963] ffff88849a31d940 (kn->count#9){++++}, at: kernfs_remove_by_name_ns+0x3b/0x80
<4> [739.167976]
but task is already holding lock:
<4> [739.167980] ffffffff8263ba60 (cpuhp_state-down){+.+.}, at: cpuhp_thread_fun+0x39/0x220
<4> [739.167989]
which lock already depends on the new lock.
<4> [739.167994]
the existing dependency chain (in reverse order) is:
<4> [739.167999]
-> #6 (cpuhp_state-down){+.+.}:
<4> [739.168006] cpuhp_kick_ap_work+0x48/0x290
<4> [739.168013] _cpu_down+0x13c/0x1c0
<4> [739.168016] do_cpu_down+0x29/0x50
<4> [739.168023] device_offline+0x6a/0xb0
<4> [739.168027] online_store+0x45/0x90
<4> [739.168032] kernfs_fop_write+0x112/0x1b0
<4> [739.168039] vfs_write+0xb9/0x1d0
<4> [739.168043] ksys_write+0x9f/0xe0
<4> [739.168049] do_syscall_64+0x4f/0x220
<4> [739.168054] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [739.168057]
-> #5 (cpu_hotplug_lock.rw_sem){++++}:
<4> [739.168065] cpus_read_lock+0x34/0xd0
<4> [739.168072] rcu_barrier+0xaa/0x190
<4> [739.168076] kernel_init+0x21/0x100
<4> [739.168080] ret_from_fork+0x24/0x50
<4> [739.168083]
-> #4 (rcu_state.barrier_mutex){+.+.}:
<4> [739.168090] __mutex_lock+0x9a/0x9c0
<4> [739.168094] rcu_barrier+0x23/0x190
<4> [739.168192] i915_gem_object_unbind+0x277/0x430 [i915]
<4> [739.168265] i915_gem_object_pin_to_display_plane+0x4f/0x120 [i915]
<4> [739.168347] intel_pin_and_fence_fb_obj+0x90/0x1a0 [i915]
<4> [739.168425] intel_plane_pin_fb+0x3f/0xd0 [i915]
<4> [739.168502] intel_prepare_plane_fb+0x12a/0x590 [i915]
<4> [739.168509] drm_atomic_helper_prepare_planes+0x85/0x110
<4> [739.168594] intel_atomic_commit+0xe3/0x3e0 [i915]
<4> [739.168601] drm_mode_atomic_ioctl+0x860/0x980
<4> [739.168606] drm_ioctl_kernel+0xa7/0xf0
<4> [739.168611] drm_ioctl+0x2e1/0x390
<4> [739.168616] do_vfs_ioctl+0x9c/0x730
<4> [739.168619] ksys_ioctl+0x35/0x60
<4> [739.168623] __x64_sys_ioctl+0x11/0x20
<4> [739.168628] do_syscall_64+0x4f/0x220
<4> [739.168632] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [739.168636]
-> #3 (crtc_ww_class_mutex){+.+.}:
<4> [739.168644] __ww_mutex_lock.constprop.15+0xc3/0x1090
<4> [739.168649] ww_mutex_lock+0x39/0x70
<4> [739.168654] drm_modeset_lock+0x6c/0x120
<4> [739.168658] drm_mode_config_init+0x2c9/0x900
<4> [739.168732] intel_modeset_init+0x7f/0x1cd0 [i915]
<4> [739.168781] i915_driver_probe+0xaf1/0x15f0 [i915]
<4> [739.168830] i915_pci_probe+0x43/0x1c0 [i915]
<4> [739.168836] pci_device_probe+0x9e/0x120
<4> [739.168841] really_probe+0xea/0x420
<4> [739.168846] driver_probe_device+0x10b/0x120
<4> [739.168850] device_driver_attach+0x4a/0x50
<4> [739.168855] __driver_attach+0x97/0x130
<4> [739.168859] bus_for_each_dev+0x74/0xc0
<4> [739.168864] bus_add_driver+0x142/0x220
<4> [739.168869] driver_register+0x56/0xf0
<4> [739.168873] do_one_initcall+0x58/0x2ff
<4> [739.168879] do_init_module+0x56/0x1f2
<4> [739.168884] load_module+0x2458/0x2a10
<4> [739.168889] __do_sys_finit_module+0xe9/0x110
<4> [739.168893] do_syscall_64+0x4f/0x220
<4> [739.168897] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [739.168901]
-> #2 (crtc_ww_class_acquire){+.+.}:
<4> [739.168908] drm_modeset_acquire_init+0xc4/0xf0
<4> [739.168983] glk_force_audio_cdclk+0x25/0x120 [i915]
<4> [739.169056] i915_audio_component_get_power+0x94/0x100 [i915]
<4> [739.169066] snd_hdac_display_power+0x7d/0x120 [snd_hda_core]
<4> [739.169073] azx_probe_work+0x88/0x7f0 [snd_hda_intel]
<4> [739.169079] process_one_work+0x26a/0x620
<4> [739.169083] worker_thread+0x37/0x380
<4> [739.169087] kthread+0x119/0x130
<4> [739.169091] ret_from_fork+0x24/0x50
<4> [739.169094]
-> #1 (&bus->lock){+.+.}:
<4> [739.169101] __mutex_lock+0x9a/0x9c0
<4> [739.169108] snd_hdac_display_power+0x2d/0x120 [snd_hda_core]
<4> [739.169114] __azx_runtime_resume+0x1a/0xe0 [snd_hda_intel]
<4> [739.169120] azx_runtime_resume+0x4b/0x130 [snd_hda_intel]
<4> [739.169126] pci_pm_runtime_resume+0x6c/0x90
<4> [739.169131] __rpm_callback+0xb1/0x110
<4> [739.169135] rpm_callback+0x1a/0x70
<4> [739.169139] rpm_resume+0x50e/0x790
<4> [739.169143] pm_runtime_forbid+0x39/0x50
<4> [739.169148] control_store+0x77/0x80
<4> [739.169153] kernfs_fop_write+0x112/0x1b0
<4> [739.169159] vfs_write+0xb9/0x1d0
<4> [739.169163] ksys_write+0x9f/0xe0
<4> [739.169167] do_syscall_64+0x4f/0x220
<4> [739.169171] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [739.169175]
-> #0 (kn->count#9){++++}:
<4> [739.169181] __lock_acquire+0x1328/0x15d0
<4> [739.169186] lock_acquire+0xa7/0x1c0
<4> [739.169190] __kernfs_remove+0x260/0x2d0
<4> [739.169195] kernfs_remove_by_name_ns+0x3b/0x80
<4> [739.169200] sysfs_unmerge_group+0x38/0x50
<4> [739.169205] dpm_sysfs_remove+0x32/0x60
<4> [739.169209] device_del+0x84/0x400
<4> [739.169213] device_unregister+0x11/0x60
<4> [739.169218] mce_cpu_pre_down+0xfd/0x130
<4> [739.169222] cpuhp_invoke_callback+0x9b/0x9d0
<4> [739.169226] cpuhp_thread_fun+0x1c8/0x220
<4> [739.169232] smpboot_thread_fn+0x1d3/0x280
<4> [739.169236] kthread+0x119/0x130
<4> [739.169240] ret_from_fork+0x24/0x50
<4> [739.169243]
other info that might help us debug this:
<4> [739.169248] Chain exists of:
kn->count#9 --> cpu_hotplug_lock.rw_sem --> cpuhp_state-down
<4> [739.169257] Possible unsafe locking scenario:
<4> [739.169261] CPU0 CPU1
<4> [739.169265] ---- ----
<4> [739.169268] lock(cpuhp_state-down);
<4> [739.169272] lock(cpu_hotplug_lock.rw_sem);
<4> [739.169277] lock(cpuhp_state-down);
<4> [739.169281] lock(kn->count#9);
<4> [739.169285]
*** DEADLOCK ***