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

Commit 8c9d1fa5 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm: protect blob list within blob_lock"

parents bacf5c44 46f6a79f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -793,8 +793,10 @@ 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;