igt@i915_pm_rpm@* - dmesg-warn - WARNING: possible circular locking dependency detected, is trying to acquire lock at: snd_hdac_display_power, but task is already holding lock at: kernfs_fop_write
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7510/shard-tglb1/igt@i915_pm_rpm@gem-mmap-gtt.html
<4> [239.887438] ======================================================
<4> [239.887440] WARNING: possible circular locking dependency detected
<4> [239.887442] 5.4.0-rc8-CI-CI_DRM_7510+ #1 Tainted: G U
<4> [239.887443] ------------------------------------------------------
<4> [239.887444] i915_pm_rpm/1442 is trying to acquire lock:
<4> [239.887446] ffff888488a3c5b8 (&bus->lock){+.+.}, at: snd_hdac_display_power+0x2d/0x120 [snd_hda_core]
<4> [239.887453]
but task is already holding lock:
<4> [239.887454] ffff88849c1087d0 (kn->count#9){++++}, at: kernfs_fop_write+0xdc/0x190
<4> [239.887460]
which lock already depends on the new lock.
<4> [239.887461]
the existing dependency chain (in reverse order) is:
<4> [239.887462]
-> #6 (kn->count#9){++++}:
<4> [239.887466] __kernfs_remove+0x265/0x2d0
<4> [239.887468] kernfs_remove_by_name_ns+0x3b/0x80
<4> [239.887469] sysfs_unmerge_group+0x38/0x50
<4> [239.887474] dpm_sysfs_remove+0x32/0x60
<4> [239.887477] device_del+0x6e/0x380
<4> [239.887479] device_unregister+0x11/0x60
<4> [239.887483] mce_cpu_pre_down+0xfd/0x130
<4> [239.887487] cpuhp_invoke_callback+0x9b/0x9d0
<4> [239.887489] cpuhp_thread_fun+0x1d2/0x230
<4> [239.887493] smpboot_thread_fn+0x1d3/0x280
<4> [239.887497] kthread+0x119/0x130
<4> [239.887500] ret_from_fork+0x24/0x50
<4> [239.887501]
-> #5 (cpuhp_state-down){+.+.}:
<4> [239.887504] cpuhp_kick_ap_work+0x48/0x2a0
<4> [239.887507] _cpu_down+0x13c/0x1c0
<4> [239.887509] do_cpu_down+0x29/0x50
<4> [239.887511] device_offline+0x6a/0xb0
<4> [239.887512] online_store+0x45/0x90
<4> [239.887514] kernfs_fop_write+0x104/0x190
<4> [239.887517] vfs_write+0xb9/0x1d0
<4> [239.887519] ksys_write+0x9f/0xe0
<4> [239.887522] do_syscall_64+0x4f/0x210
<4> [239.887524] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [239.887525]
-> #4 (cpu_hotplug_lock.rw_sem){++++}:
<4> [239.887527] cpus_read_lock+0x34/0xd0
<4> [239.887530] rcu_barrier+0xaa/0x190
<4> [239.887533] kernel_init+0x21/0x100
<4> [239.887534] ret_from_fork+0x24/0x50
<4> [239.887535]
-> #3 (rcu_state.barrier_mutex){+.+.}:
<4> [239.887538] __mutex_lock+0x9a/0x9d0
<4> [239.887539] rcu_barrier+0x23/0x190
<4> [239.887607] i915_gem_object_unbind+0x264/0x3d0 [i915]
<4> [239.887652] i915_gem_object_pin_to_display_plane+0x4f/0x120 [i915]
<4> [239.887704] intel_pin_and_fence_fb_obj+0x90/0x170 [i915]
<4> [239.887755] intel_plane_pin_fb+0x3f/0xd0 [i915]
<4> [239.887804] intel_prepare_plane_fb+0x130/0x520 [i915]
<4> [239.887807] drm_atomic_helper_prepare_planes+0x85/0x110
<4> [239.887856] intel_atomic_commit+0xc6/0x350 [i915]
<4> [239.887858] drm_mode_atomic_ioctl+0x847/0x930
<4> [239.887860] drm_ioctl_kernel+0xa7/0xf0
<4> [239.887862] drm_ioctl+0x2e1/0x390
<4> [239.887865] do_vfs_ioctl+0xa0/0x6f0
<4> [239.887866] ksys_ioctl+0x35/0x60
<4> [239.887868] __x64_sys_ioctl+0x11/0x20
<4> [239.887869] do_syscall_64+0x4f/0x210
<4> [239.887871] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [239.887872]
-> #2 (crtc_ww_class_mutex){+.+.}:
<4> [239.887875] __ww_mutex_lock.constprop.15+0xc3/0x1090
<4> [239.887877] ww_mutex_lock+0x39/0x70
<4> [239.887879] drm_modeset_lock+0x6c/0x120
<4> [239.887882] drm_mode_config_init+0x2c9/0x910
<4> [239.887930] intel_modeset_init+0x7f/0x1cd0 [i915]
<4> [239.887961] i915_driver_probe+0xaf1/0x15f0 [i915]
<4> [239.887992] i915_pci_probe+0x43/0x1c0 [i915]
<4> [239.887995] pci_device_probe+0x9e/0x120
<4> [239.887997] really_probe+0xea/0x420
<4> [239.887999] driver_probe_device+0x10b/0x120
<4> [239.888000] device_driver_attach+0x4a/0x50
<4> [239.888002] __driver_attach+0x97/0x130
<4> [239.888004] bus_for_each_dev+0x74/0xc0
<4> [239.888005] bus_add_driver+0x142/0x220
<4> [239.888007] driver_register+0x56/0xf0
<4> [239.888008] do_one_initcall+0x58/0x2ff
<4> [239.888010] do_init_module+0x56/0x1f8
<4> [239.888012] load_module+0x243e/0x29f0
<4> [239.888014] __do_sys_finit_module+0xe9/0x110
<4> [239.888015] do_syscall_64+0x4f/0x210
<4> [239.888017] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [239.888018]
-> #1 (crtc_ww_class_acquire){+.+.}:
<4> [239.888021] drm_modeset_acquire_init+0xc4/0xf0
<4> [239.888068] glk_force_audio_cdclk+0x25/0x100 [i915]
<4> [239.888115] i915_audio_component_get_power+0x94/0x100 [i915]
<4> [239.888119] snd_hdac_display_power+0x7d/0x120 [snd_hda_core]
<4> [239.888121] azx_probe_work+0x88/0x7f0 [snd_hda_intel]
<4> [239.888123] process_one_work+0x26a/0x620
<4> [239.888125] worker_thread+0x37/0x380
<4> [239.888127] kthread+0x119/0x130
<4> [239.888128] ret_from_fork+0x24/0x50
<4> [239.888129]
-> #0 (&bus->lock){+.+.}:
<4> [239.888132] __lock_acquire+0x1328/0x15d0
<4> [239.888133] lock_acquire+0xa7/0x1c0
<4> [239.888135] __mutex_lock+0x9a/0x9d0
<4> [239.888138] snd_hdac_display_power+0x2d/0x120 [snd_hda_core]
<4> [239.888140] __azx_runtime_resume+0x1a/0xe0 [snd_hda_intel]
<4> [239.888142] azx_runtime_resume+0x4b/0x130 [snd_hda_intel]
<4> [239.888144] pci_pm_runtime_resume+0x6a/0xc0
<4> [239.888146] __rpm_callback+0xb1/0x110
<4> [239.888148] rpm_callback+0x1a/0x70
<4> [239.888149] rpm_resume+0x50e/0x790
<4> [239.888151] pm_runtime_forbid+0x39/0x50
<4> [239.888153] control_store+0x77/0x80
<4> [239.888154] kernfs_fop_write+0x104/0x190
<4> [239.888155] vfs_write+0xb9/0x1d0
<4> [239.888157] ksys_write+0x9f/0xe0
<4> [239.888158] do_syscall_64+0x4f/0x210
<4> [239.888160] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [239.888161]
other info that might help us debug this:
<4> [239.888161] Chain exists of:
&bus->lock --> cpuhp_state-down --> kn->count#9
<4> [239.888163] Possible unsafe locking scenario:
<4> [239.888164] CPU0 CPU1
<4> [239.888165] ---- ----
<4> [239.888166] lock(kn->count#9);
<4> [239.888167] lock(cpuhp_state-down);
<4> [239.888168] lock(kn->count#9);
<4> [239.888182] lock(&bus->lock);
<4> [239.888184]
*** DEADLOCK ***