summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2012-08-16 08:29:03 +0000
committerDave Airlie <airlied@redhat.com>2012-08-24 09:38:40 +1000
commit7c4eaca4162d0b5ad4fb39f974d7ffd71b9daa09 (patch)
tree1b1851a45b209cdc24489866326bc987c0c22315 /drivers/gpu
parent22f5d115a2b087c977128f84ee557ad71530330e (diff)
downloadlinux-7c4eaca4162d0b5ad4fb39f974d7ffd71b9daa09.tar.gz
linux-7c4eaca4162d0b5ad4fb39f974d7ffd71b9daa09.tar.bz2
linux-7c4eaca4162d0b5ad4fb39f974d7ffd71b9daa09.zip
drm: Check for invalid cursor flags
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 08a7aa722d6b..6fbfc244748f 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1981,7 +1981,7 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;
- if (!req->flags)
+ if (!req->flags || (~DRM_MODE_CURSOR_FLAGS & req->flags))
return -EINVAL;
mutex_lock(&dev->mode_config.mutex);