diff options
author | Lyude Paul <lyude@redhat.com> | 2018-12-12 00:50:26 +0100 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2018-12-13 23:40:49 +0100 |
commit | f536e00c46d22ccd1b2aada5b22754c35d9487ce (patch) | |
tree | 554a20602e68d0c608a6a34fd83c566e4915835c /drivers/gpu/drm/drm_dp_mst_topology.c | |
parent | drm: Rename crtc_idr as object_idr to KMS cleanups (diff) | |
download | linux-f536e00c46d22ccd1b2aada5b22754c35d9487ce.tar.xz linux-f536e00c46d22ccd1b2aada5b22754c35d9487ce.zip |
drm/dp_mst: Fix memory leak in drm_dp_mst_topology_mgr_destroy()
We need to call drm_dp_mst_topology_mgr_set_mst(mgr, false) when
destroying the topology manager in order to ensure that the root mstb
and all of it's descendents are actually destroyed, and additionally to
try to make sure that we leave the hub in a clean state.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181211235026.21758-1-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/drm_dp_mst_topology.c')
-rw-r--r-- | drivers/gpu/drm/drm_dp_mst_topology.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 5a73a0b1c9cd..ad0fb6d003be 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3235,6 +3235,7 @@ EXPORT_SYMBOL(drm_dp_mst_topology_mgr_init); */ void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr) { + drm_dp_mst_topology_mgr_set_mst(mgr, false); flush_work(&mgr->work); flush_work(&mgr->destroy_connector_work); mutex_lock(&mgr->payload_lock); |