* Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree
@ 2026-07-29 16:28 gregkh
2026-07-29 16:37 ` sashiko-bot
2026-07-29 17:02 ` ✗ Fi.CI.BUILD: failure for " Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: gregkh @ 2026-07-29 16:28 UTC (permalink / raw)
To: dev, dri-devel, gregkh, imre.deak, intel-gfx, jonas.emilsson,
luciano.coelho, lyude
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()
to the 6.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-dp_mst-handle-torn-down-topology-gracefully-in-drm_dp_mst_topology_queue_probe.patch
and it can be found in the queue-6.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From 613059875958e7b217b250ed14c3b189f9488421 Mon Sep 17 00:00:00 2001
From: Luca Coelho <luciano.coelho@intel.com>
Date: Mon, 22 Jun 2026 17:03:58 +0300
Subject: drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()
From: Luca Coelho <luciano.coelho@intel.com>
commit 613059875958e7b217b250ed14c3b189f9488421 upstream.
A hotplug or link-loss event can tear down the MST topology
(setting mgr->mst_state = false and mgr->mst_primary = NULL) concurrently
with a caller invoking drm_dp_mst_topology_queue_probe(). Since the check
is already performed under mgr->lock, the condition is not a programming
error but a valid race -- the topology was valid when the caller decided
to call this function, but was torn down before the lock was acquired.
Replace the drm_WARN_ON() with a graceful early return. This eliminates
spurious kernel warnings and the resulting compositor crashes observed
when connecting/disconnecting DP MST monitors, while keeping the correct
behavior of doing nothing when MST is not active. A drm_dbg_mst() trace
is added so the skipped probe remains observable under MST debug logging.
The existing WARN_ON(mgr->mst_primary) in drm_dp_mst_topology_mgr_set_mst()
already catches the case where the topology is initialized twice, so no
diagnostic coverage is lost.
Fixes: dbaeef363ea5 ("drm/dp_mst: Add a helper to queue a topology probe")
Cc: Imre Deak <imre.deak@intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Jonas Emilsson <jonas.emilsson@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/all/20260503034533.1023686-1-jonas.emilsson@gmail.com
Acked-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260622140532.526722-1-luciano.coelho@intel.com
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -3743,8 +3743,10 @@ void drm_dp_mst_topology_queue_probe(str
{
mutex_lock(&mgr->lock);
- if (drm_WARN_ON(mgr->dev, !mgr->mst_state || !mgr->mst_primary))
+ if (!mgr->mst_state || !mgr->mst_primary) {
+ drm_dbg_kms(mgr->dev, "queue_probe skipped: topology torn down\n");
goto out_unlock;
+ }
drm_dp_mst_topology_mgr_invalidate_mstb(mgr->mst_primary);
drm_dp_mst_queue_probe_work(mgr);
Patches currently in stable-queue which might be from luciano.coelho@intel.com are
queue-6.12/drm-dp_mst-handle-torn-down-topology-gracefully-in-drm_dp_mst_topology_queue_probe.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree
2026-07-29 16:28 Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree gregkh
@ 2026-07-29 16:37 ` sashiko-bot
2026-07-29 17:02 ` ✗ Fi.CI.BUILD: failure for " Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-29 16:37 UTC (permalink / raw)
To: gregkh; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Calling `mutex_lock()` from within an atomic encoder callback path.
--
--- Patch [1]: Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree ---
commit 746d73e2e2b5ca58eedb8e8371b10fa271386f44
Author: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()
This commit replaces a drm_WARN_ON with an early return in
drm_dp_mst_topology_queue_probe() to handle torn-down topologies gracefully
during concurrent hotplug or link-loss events. This eliminates spurious
kernel warnings and compositor crashes.
Link: https://lore.kernel.org/all/20260503034533.1023686-1-jonas.emilsson@gmail.com
Link: https://patch.msgid.link/20260622140532.526722-1-luciano.coelho@intel.com
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index ac90118b9e7a8..97ddd10df0229 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -3739,8 +3739,10 @@ void drm_dp_mst_topology_queue_probe(struct drm_dp_mst_topology_mgr *mgr)
> {
> mutex_lock(&mgr->lock);
[Severity: High]
This is a pre-existing issue, but won't this mutex lock cause a sleeping
in atomic context warning?
During non-blocking commits, the encoder atomic callback
intel_mst_pre_enable_dp() runs in an atomic context where sleeping is
forbidden. It calls intel_mst_reprobe_topology(), which then calls this
function:
intel_mst_pre_enable_dp() ->
intel_mst_reprobe_topology() ->
drm_dp_mst_topology_queue_probe()
Since drm_dp_mst_topology_queue_probe() unconditionally acquires mgr->lock
using mutex_lock(), won't this lead to scheduling while atomic splats or
potential deadlocks during hotplug events and modesets involving MST links?
> - if (drm_WARN_ON(mgr->dev, !mgr->mst_state || !mgr->mst_primary))
> + if (!mgr->mst_state || !mgr->mst_primary) {
> + drm_dbg_kms(mgr->dev, "queue_probe skipped: topology torn down\n");
> goto out_unlock;
> + }
>
> drm_dp_mst_topology_mgr_invalidate_mstb(mgr->mst_primary);
> drm_dp_mst_queue_probe_work(mgr);
--
Sashiko AI review · https://sashiko.dev/#/patchset/2026072907-framing-morphine-00a8@gregkh?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* ✗ Fi.CI.BUILD: failure for Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree
2026-07-29 16:28 Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree gregkh
2026-07-29 16:37 ` sashiko-bot
@ 2026-07-29 17:02 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-07-29 17:02 UTC (permalink / raw)
To: gregkh; +Cc: intel-gfx
== Series Details ==
Series: Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree
URL : https://patchwork.freedesktop.org/series/171296/
State : failure
== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/171296/revisions/1/mbox/ not applied
Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To record the empty patch as an empty commit, run "git am --allow-empty".
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-29 17:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 16:28 Patch "drm/dp_mst: Handle torn-down topology gracefully in drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree gregkh
2026-07-29 16:37 ` sashiko-bot
2026-07-29 17:02 ` ✗ Fi.CI.BUILD: failure for " Patchwork
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.