Commit f536e00c authored by Lyude Paul's avatar Lyude Paul

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: default avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181211235026.21758-1-lyude@redhat.com
parent b5f06893
...@@ -3235,6 +3235,7 @@ EXPORT_SYMBOL(drm_dp_mst_topology_mgr_init); ...@@ -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) 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->work);
flush_work(&mgr->destroy_connector_work); flush_work(&mgr->destroy_connector_work);
mutex_lock(&mgr->payload_lock); mutex_lock(&mgr->payload_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment