Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b712e99 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm: lock the user blob access while traversing the list"

parents 524baaee e5bb37dc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -768,9 +768,13 @@ int drm_mode_createblob_ioctl(struct drm_device *dev,
	if (!drm_core_check_feature(dev, DRIVER_MODESET))
		return -EINVAL;

	mutex_lock(&dev->mode_config.blob_lock);

	list_for_each_entry(bt, &file_priv->blobs, head_file)
		count++;

	mutex_unlock(&dev->mode_config.blob_lock);

	if (count == MAX_BLOB_PROP_COUNT)
		return -EINVAL;