public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect
@ 2023-09-15  4:54 Ramya SR
  2023-09-22  9:41 ` Ramya SR
  2023-09-22 19:02 ` Lyude Paul
  0 siblings, 2 replies; 11+ messages in thread
From: Ramya SR @ 2023-09-15  4:54 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, Lyude Paul, Wayne Lin, Jani Nikula,
	Imre Deak, Alex Deucher, Jeff Layton, dri-devel, linux-kernel
  Cc: Ramya SR

Modeset mutex unlock is missing in drm_dp_mst_detect_port function.
This will lead to deadlock if calling the function multiple times in
an atomic operation, for example, getting imultiple MST ports status
for a DP MST bonding scenario.

Signed-off-by: Ramya SR <quic_rsr@quicinc.com>
---
 drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index ed96cfc..d6512c4 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -4154,7 +4154,7 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
 
 	ret = drm_modeset_lock(&mgr->base.lock, ctx);
 	if (ret)
-		goto out;
+		goto fail;
 
 	ret = connector_status_disconnected;
 
@@ -4181,6 +4181,8 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
 		break;
 	}
 out:
+	drm_modeset_unlock(&mgr->base.lock);
+fail:
 	drm_dp_mst_topology_put_port(port);
 	return ret;
 }
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-09-29  8:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15  4:54 [PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect Ramya SR
2023-09-22  9:41 ` Ramya SR
2023-09-22 19:02 ` Lyude Paul
2023-09-22 19:22   ` Imre Deak
2023-09-22 19:23     ` Lyude Paul
2023-09-25 14:57     ` Alex Deucher
2023-09-26 10:41       ` Ramya SR
2023-09-28  2:25         ` Ramya SR
2023-09-28  8:23           ` Jani Nikula
2023-09-29  4:44           ` Ramya SR
2023-09-29  7:53             ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox