Skip to content

Commit

Permalink
drm: add control node checks missing from kms merge
Browse files Browse the repository at this point in the history
This line that checks the DRM_CONTROL_ALLOW flag was missed from the KMS
merge.  Re-add the check on the IOCTL, as this is currently the only use of
this flag.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Jonas Bonn authored and Dave Airlie committed Apr 24, 2009
1 parent c964b12 commit 59738d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 59738d5

Please sign in to comment.