From: Mark Yao Date: Wed, 2 Aug 2017 02:52:51 +0000 (+0800) Subject: drm: fix mutex lock on connector register X-Git-Tag: release-20171130_firefly~4^2~49 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e7bf29dec52410e8b81731249b6112f124cc60c3;p=firefly-linux-kernel-4.4.55.git drm: fix mutex lock on connector register Fixes: c4a3cc5 ("drm: Paper over locking inversion after registration rework") Change-Id: I43c8ec8ed7e21416a1e2531cd84d04ba148ad0c4 Signed-off-by: Mark Yao --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 8aa49693c27b..93388659ee7d 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1125,7 +1125,6 @@ int drm_connector_register_all(struct drm_device *dev) return 0; err: - mutex_unlock(&dev->mode_config.mutex); drm_connector_unregister_all(dev); return ret; } @@ -1146,7 +1145,7 @@ void drm_connector_unregister_all(struct drm_device *dev) struct drm_connector *connector; /* FIXME: taking the mode config mutex ends up in a clash with sysfs */ - drm_for_each_connector(connector, dev) + list_for_each_entry(connector, &dev->mode_config.connector_list, head) drm_connector_unregister(connector); } EXPORT_SYMBOL(drm_connector_unregister_all);