]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/dp/mst: close deadlock in connector destruction.
authorDave Airlie <airlied@redhat.com>
Mon, 15 Jun 2015 00:34:28 +0000 (10:34 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:08 +0000 (09:29 -0700)
commit5c507167d2ef467ecd2ec4ad40a0bd70b4fad814
tree0ab4cf22e1738df9d460447607fed82df3ed4666
parent0f0b7b10c3545704cf0d1705e33f1cc5a9fe8097
drm/dp/mst: close deadlock in connector destruction.

commit 6b8eeca65b18ae77e175cc2b6571731f0ee413bf upstream.

I've only seen this once, and I failed to capture the
lockdep backtrace, but I did some investigations.

If we are calling into the MST layer from EDID probing,
we have the mode_config mutex held, if during that EDID
probing, the MST hub goes away, then we can get a deadlock
where the connector destruction function in the driver
tries to retake the mode config mutex.

This offloads connector destruction to a workqueue,
and avoid the subsequenct lock ordering issue.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_dp_mst_topology.c
include/drm/drm_crtc.h
include/drm/drm_dp_mst_helper.h