[PATCH] drm/dp: cancel any work on disconnect

Dave Airlie airlied at gmail.com
Thu Jun 18 17:20:56 PDT 2015


From: Dave Airlie <airlied at redhat.com>

Since we might have queued work but it hasn't executed yet
this could cause an oops in drm_dp_check_and_send_link_address.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89366

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index fb65f5d..7678cb5 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -1936,6 +1936,8 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
 
 		ret = 0;
 	} else {
+		/* flush any pending work */
+		cancel_work_sync(&mgr->work);
 		/* disable MST on the device */
 		mstb = mgr->mst_primary;
 		mgr->mst_primary = NULL;
-- 
2.4.1



More information about the dri-devel mailing list