[PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect
Ramya SR
rsr at qti.qualcomm.com
Fri Sep 22 09:41:34 UTC 2023
Gentle Reminder. Please review the commit.
-----Original Message-----
From: Ramya SR (QUIC) <quic_rsr at quicinc.com>
Sent: Friday, September 15, 2023 10:25 AM
To: David Airlie <airlied at gmail.com>; Daniel Vetter <daniel at ffwll.ch>; Lyude Paul <lyude at redhat.com>; Wayne Lin <Wayne.Lin at amd.com>; Jani Nikula <jani.nikula at intel.com>; Imre Deak <imre.deak at intel.com>; Alex Deucher <alexander.deucher at amd.com>; Jeff Layton <jlayton at kernel.org>; dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org
Cc: Ramya SR (QUIC) <quic_rsr at quicinc.com>
Subject: [PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect
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 at 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
More information about the dri-devel
mailing list