Skip to contentSkip to conversation

drm/amd/display: Fix missing unlock in dm_handle_mst_sideband_msg_ready_event()

PATCH In review Yang Yingliang 2 participants 2 messages Jul 25, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix missing unlock in dm_handle_mst_sideband_msg_ready_event()

Add missing mutex_unlock() in error path in
dm_handle_mst_sideband_msg_ready_event().

Fixes 4f6d9e38c4d2 ("drm/amd/display: Add polling method to handle MST reply packet")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +1 -0
index 1abdec14344e..cddb91cf3dde 100644
@@ -707,6 +707,7 @@ void dm_handle_mst_sideband_msg_ready_event(
 
 			if (retry == 3) {
 				DRM_ERROR("Failed to ack MST event.\n");
+				mutex_unlock(&aconnector->handle_mst_msg_ready);
 				return;
 			}
 
Signature · 1 line
2.25.1
#1 lore raw

Already applied the fix for this from Dan.

Thanks!

Alex

Quoted 25 lines · Yang Yingliang

Add missing mutex_unlock() in error path in
dm_handle_mst_sideband_msg_ready_event().

Fixes 4f6d9e38c4d2 ("drm/amd/display: Add polling method to handle MST reply packet")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +1 -1
index 1abdec14344e..cddb91cf3dde 100644
@@ -707,6 +707,7 @@ void dm_handle_mst_sideband_msg_ready_event(
 
                        if (retry == 3) {
                                DRM_ERROR("Failed to ack MST event.\n");
+                               mutex_unlock(&aconnector->handle_mst_msg_ready);
                                return;
                        }
 
--

2.25.1