aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_drv.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-05 17:02:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-05 17:02:05 -0700
commit413f81eba35d6ede9289b0c8a920c013a84fac71 (patch)
tree688a864f1fa822ac9b60b08add6c7e2e9d35a372 /drivers/gpu/drm/drm_drv.c
parent899ad580fe93c6d2a9f364fb0329ef2c259ccd1d (diff)
parent42beefc0093725ec0f8cea340cc54c36ccaceea0 (diff)
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/r128: fix r128 ioremaps to use ioremap_wc. drm: cleanup properly in drm_get_dev() failure paths drm: clean the map list before destroying the hash table drm: remove unreachable code in drm_sysfs.c drm: add control node checks missing from kms merge drm/kms: don't try to shortcut drm mode set function drm/radeon: bump minor version for occlusion queries support
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r--drivers/gpu/drm/drm_drv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index c4ada8b6295..f01def16a66 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -456,7 +456,8 @@ int drm_ioctl(struct inode *inode, struct file *filp,
retcode = -EINVAL;
} else if (((ioctl->flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN)) ||
((ioctl->flags & DRM_AUTH) && !file_priv->authenticated) ||
- ((ioctl->flags & DRM_MASTER) && !file_priv->is_master)) {
+ ((ioctl->flags & DRM_MASTER) && !file_priv->is_master) ||
+ (!(ioctl->flags & DRM_CONTROL_ALLOW) && (file_priv->minor->type == DRM_MINOR_CONTROL))) {
retcode = -EACCES;
} else {
if (cmd & (IOC_IN | IOC_OUT)) {