From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> The edid is protected by mode_config.mutex so extend the locking to protect the property readout part as well. Cc: Keith Packard <keithp@xxxxxxxxxx> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_connector.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 2bf19a37dbac..122060792b6f 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1624,15 +1624,12 @@ int drm_mode_getconnector(struct drm_device *dev, void *data, if (copy_to_user(mode_ptr + copied, &u_mode, sizeof(u_mode))) { ret = -EFAULT; - mutex_unlock(&dev->mode_config.mutex); - goto out; } copied++; } } out_resp->count_modes = mode_count; - mutex_unlock(&dev->mode_config.mutex); drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); encoder = drm_connector_get_encoder(connector); @@ -1650,6 +1647,8 @@ int drm_mode_getconnector(struct drm_device *dev, void *data, drm_modeset_unlock(&dev->mode_config.connection_mutex); out: + mutex_unlock(&dev->mode_config.mutex); + drm_connector_put(connector); return ret; -- 2.13.6 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel