drm/dp/mst: Remove port after removing connector.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 11 Aug 2015 07:54:29 +0000 (09:54 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:45:35 +0000 (15:45 -0500)
commit7d1dc93a85c3593f35985b78ab5325085c2fa2e6
tree2a4692411b9f1504f016189e78dfac418db3b71c
parent95b098789dd20a09885c288fe8db200c26490c18
drm/dp/mst: Remove port after removing connector.

[ Upstream commit 4772ff03df8094fd99d28de5fcf5df3a3e9c68bb ]

The port is removed synchronously, but the connector delayed.
This causes a use after free which can cause a kernel BUG with
slug_debug=FPZU. This is fixed by freeing the port after the
connector.

This fixes a regression introduced with
6b8eeca65b18ae77e175cc2b6571731f0ee413bf
"drm/dp/mst: close deadlock in connector destruction."

Cc: stable@vger.kernel.org
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpu/drm/drm_dp_mst_topology.c
include/drm/drm_crtc.h