From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Simona Vetter <simona.vetter@ffwll.ch>
Cc: "Jeff Johnson" <jeff.johnson@oss.qualcomm.com>,
"Nikula, Jani" <jani.nikula@linux.intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
dri-devel@lists.freedesktop.org,
linux-kernel <linux-kernel@vger.kernel.org>,
"Linux AMDGPU" <amd-gfx@lists.freedesktop.org>
Subject: Re: WARNING: possible circular locking dependency detected: drm_client_dev_suspend() & radeon_suspend_kms()
Date: Fri, 11 Jul 2025 17:46:44 +0300 [thread overview]
Message-ID: <aHEj1GQjjIiCbhjB@intel.com> (raw)
In-Reply-To: <CAKMK7uH7Hcviwyw2wZK=WVxcb4zBC+EKpsREhb4FHe_AxEi8gg@mail.gmail.com>
On Fri, Jul 11, 2025 at 11:08:03AM +0200, Simona Vetter wrote:
> On Thu, Jul 10, 2025 at 04:43:02PM -0700, Jeff Johnson wrote:
> > I'm trying to debug a hibernation issue with the ath12k driver, but to
> > establish a baseline I started with Linus' current tree. I have the following
> > enabled in my .config:
> >
> > CONFIG_PROVE_LOCKING=y
> > CONFIG_PROVE_RAW_LOCK_NESTING=y
> > CONFIG_PROVE_RCU=y
> >
> > As part of the baseline I observed the following:
>
> On a very quick guess I'd bet on the drm_client conversion for i915 to
> have broken something here. Adding more people.
Looks to me like it's simply due to this code in radeon:
radeon_suspend_kms(...)
{
...
if (notify_clients) {
console_lock();
drm_client_dev_suspend(dev, true);
console_unlock();
}
...
}
> -Sima
>
>
> >
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ======================================================
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: WARNING: possible circular locking dependency detected
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: 6.16.0-rc5+ #6 Not tainted
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ------------------------------------------------------
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: kworker/u16:13/3787 is trying to acquire lock:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ffff8881113e0308 (&dev->clientlist_mutex){+.+.}-{4:4}, at: drm_client_dev_suspend+0x37/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > but task is already holding lock:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ffffffff8a2e4b80 (console_lock){+.+.}-{0:0}, at: radeon_suspend_kms+0x63b/0x7d0 [radeon]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > which lock already depends on the new lock.
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > the existing dependency chain (in reverse order) is:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > -> #1 (console_lock){+.+.}-{0:0}:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: console_lock+0x8d/0x130
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: drm_fb_helper_set_suspend_unlocked+0x10e/0x200 [drm_kms_helper]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: drm_fbdev_client_suspend+0x24/0x30 [drm_client_lib]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: drm_client_dev_suspend+0x138/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: i915_drm_suspend.isra.0+0x74/0x260 [i915]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: i915_pm_suspend+0x6b/0x90 [i915]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: pci_pm_suspend+0x1e3/0x4f0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: dpm_run_callback+0xa0/0x100
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: device_suspend+0x41e/0xdc0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: async_suspend+0x1d/0x30
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: async_run_entry_fn+0x96/0x3e0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: process_one_work+0x86e/0x14b0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: worker_thread+0x5d0/0xfc0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: kthread+0x375/0x750
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ret_from_fork+0x215/0x2f0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ret_from_fork_asm+0x1a/0x30
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > -> #0 (&dev->clientlist_mutex){+.+.}-{4:4}:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: __lock_acquire+0x15b5/0x2ac0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: lock_acquire+0x154/0x2d0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: __mutex_lock+0x15f/0x12c0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: drm_client_dev_suspend+0x37/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: radeon_suspend_kms+0x648/0x7d0 [radeon]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: pci_pm_suspend+0x1e3/0x4f0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: dpm_run_callback+0xa0/0x100
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: device_suspend+0x41e/0xdc0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: async_suspend+0x1d/0x30
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: async_run_entry_fn+0x96/0x3e0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: process_one_work+0x86e/0x14b0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: worker_thread+0x5d0/0xfc0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: kthread+0x375/0x750
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ret_from_fork+0x215/0x2f0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ret_from_fork_asm+0x1a/0x30
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > other info that might help us debug this:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: Possible unsafe locking scenario:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: CPU0 CPU1
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ---- ----
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: lock(console_lock);
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: lock(&dev->clientlist_mutex);
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: lock(console_lock);
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: lock(&dev->clientlist_mutex);
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > *** DEADLOCK ***
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: 4 locks held by kworker/u16:13/3787:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: #0: ffff888100dee148 ((wq_completion)async){+.+.}-{0:0}, at: process_one_work+0xe97/0x14b0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: #1: ffff88813f22fd30 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_one_work+0x7f6/0x14b0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: #2: ffff8881049241b0 (&dev->mutex){....}-{4:4}, at: device_suspend+0x3bd/0xdc0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: #3: ffffffff8a2e4b80 (console_lock){+.+.}-{0:0}, at: radeon_suspend_kms+0x63b/0x7d0 [radeon]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel:
> > stack backtrace:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: CPU: 0 UID: 0 PID: 3787 Comm: kworker/u16:13 Not tainted 6.16.0-rc5+ #6 PREEMPT(voluntary)
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: Hardware name: Hewlett-Packard HP ZBook 14 G2/2216, BIOS M71 Ver. 01.31 02/24/2020
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: Workqueue: async async_run_entry_fn
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: Call Trace:
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: <TASK>
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: dump_stack_lvl+0x5b/0x80
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: print_circular_bug.cold+0x178/0x1be
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: check_noncircular+0x130/0x150
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? 0xffffffffc1600000
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? radeon_suspend_kms+0x63b/0x7d0 [radeon]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: __lock_acquire+0x15b5/0x2ac0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: lock_acquire+0x154/0x2d0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? drm_client_dev_suspend+0x37/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_stack_trace_save+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? acpi_ut_release_mutex+0xba/0x150
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: __mutex_lock+0x15f/0x12c0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? drm_client_dev_suspend+0x37/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? drm_client_dev_suspend+0x37/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? add_lock_to_list+0x2c/0x1b0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx___mutex_lock+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? lock_acquire+0x154/0x2d0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? radeon_suspend_kms+0x63b/0x7d0 [radeon]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? drm_client_dev_suspend+0x37/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: drm_client_dev_suspend+0x37/0x250 [drm]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: radeon_suspend_kms+0x648/0x7d0 [radeon]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_radeon_pmops_suspend+0x10/0x10 [radeon]
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: pci_pm_suspend+0x1e3/0x4f0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_pci_pm_suspend+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: dpm_run_callback+0xa0/0x100
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_dpm_run_callback+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: device_suspend+0x41e/0xdc0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_device_suspend+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_async_suspend+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: async_suspend+0x1d/0x30
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: async_run_entry_fn+0x96/0x3e0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: process_one_work+0x86e/0x14b0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_process_one_work+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? assign_work+0x16c/0x240
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: worker_thread+0x5d0/0xfc0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_worker_thread+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: kthread+0x375/0x750
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_kthread+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? ret_from_fork+0x1f/0x2f0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? lock_release+0xc6/0x2a0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_kthread+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ret_from_fork+0x215/0x2f0
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ? __pfx_kthread+0x10/0x10
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: ret_from_fork_asm+0x1a/0x30
> > Jul 10 16:12:52 qca-HP-ZBook-14-G2 kernel: </TASK>
> >
> > This doesn't seem to be the cause of the ath12k issue I'm debugging,
> > but thought it worth mentioning since I only see one similar report
> > on lore, and that didn't have any apparent follow-up:
> > https://lore.kernel.org/all/20250202161048.373f89c0@yea/
> >
> > /jeff
>
> --
> Simona Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-07-11 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 23:43 WARNING: possible circular locking dependency detected: drm_client_dev_suspend() & radeon_suspend_kms() Jeff Johnson
2025-07-11 9:08 ` Simona Vetter
2025-07-11 14:46 ` Ville Syrjälä [this message]
2025-07-11 15:28 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aHEj1GQjjIiCbhjB@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona.vetter@ffwll.ch \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.