Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+1
+1
drivers/gpu/drm/drm_dp_mst_topology.c
··· 3235 3235 */ 3236 3236 void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr) 3237 3237 { 3238 + drm_dp_mst_topology_mgr_set_mst(mgr, false); 3238 3239 flush_work(&mgr->work); 3239 3240 flush_work(&mgr->destroy_connector_work); 3240 3241 mutex_lock(&mgr->payload_lock);