diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-31 19:16:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-31 19:16:51 -0400 |
commit | d59ebbf19b29f4964b24f38c3ad876c33cdd7368 (patch) | |
tree | 4b1d76e577989f429e4706db76ce5c600e277b72 /drivers/gpu/drm/drm_crtc.c | |
parent | 523e13455ec9ec4457a5a1d24ff7132949742b70 (diff) | |
parent | 8731b269f01e16193390c7276e70530366b8d626 (diff) |
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"Two drm atomic core fixes.
And two radeon patches needed to fix a backlight regression on some
older hardware"
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm: Correct arguments to list_tail_add in create blob ioctl
drm: crtc: integer overflow in drm_property_create_blob()
drm/radeon: fix dpms when driver backlight control is disabled
drm/radeon: move bl encoder assignment into bl init
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 33d877c65ced..8328e7059205 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -4105,7 +4105,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length, | |||
4105 | struct drm_property_blob *blob; | 4105 | struct drm_property_blob *blob; |
4106 | int ret; | 4106 | int ret; |
4107 | 4107 | ||
4108 | if (!length) | 4108 | if (!length || length > ULONG_MAX - sizeof(struct drm_property_blob)) |
4109 | return ERR_PTR(-EINVAL); | 4109 | return ERR_PTR(-EINVAL); |
4110 | 4110 | ||
4111 | blob = kzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL); | 4111 | blob = kzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL); |
@@ -4454,7 +4454,7 @@ int drm_mode_createblob_ioctl(struct drm_device *dev, | |||
4454 | * not associated with any file_priv. */ | 4454 | * not associated with any file_priv. */ |
4455 | mutex_lock(&dev->mode_config.blob_lock); | 4455 | mutex_lock(&dev->mode_config.blob_lock); |
4456 | out_resp->blob_id = blob->base.id; | 4456 | out_resp->blob_id = blob->base.id; |
4457 | list_add_tail(&file_priv->blobs, &blob->head_file); | 4457 | list_add_tail(&blob->head_file, &file_priv->blobs); |
4458 | mutex_unlock(&dev->mode_config.blob_lock); | 4458 | mutex_unlock(&dev->mode_config.blob_lock); |
4459 | 4459 | ||
4460 | return 0; | 4460 | return 0; |