Skip to content

Commit 1d06687

Browse files
Andrey Grodzovskygregkh
authored andcommitted
drm/amd/display: Avoid MST manager resource leak.
commit 5dff80b upstream. On connector destruction call drm_dp_mst_topology_mgr_destroy to release resources allocated in drm_dp_mst_topology_mgr_init. Do it only if MST manager was initilized before otherwsie a crash is seen on driver unload/device unplug. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f277453 commit 1d06687

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4882,6 +4882,13 @@ static void amdgpu_dm_connector_destroy(struct drm_connector *connector)
48824882
struct amdgpu_device *adev = connector->dev->dev_private;
48834883
struct amdgpu_display_manager *dm = &adev->dm;
48844884

4885+
/*
4886+
* Call only if mst_mgr was iniitalized before since it's not done
4887+
* for all connector types.
4888+
*/
4889+
if (aconnector->mst_mgr.dev)
4890+
drm_dp_mst_topology_mgr_destroy(&aconnector->mst_mgr);
4891+
48854892
#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) ||\
48864893
defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
48874894

0 commit comments

Comments
 (0)