Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
- index 98ae00661656..03f695d55fbd 100644
- --- a/drivers/gpu/drm/drm_ioctl.c
- +++ b/drivers/gpu/drm/drm_ioctl.c
- @@ -831,6 +831,9 @@ long drm_ioctl(struct file *filp,
- dev = file_priv->minor->dev;
- + if (DRM_IOCTL_TYPE(cmd) != DRM_IOCTL_BASE)
- + return -ENOSYS;
- +
- if (drm_dev_is_unplugged(dev))
- return -ENODEV;
- diff --git a/include/drm/drm_ioctl.h b/include/drm/drm_ioctl.h
- index 10100a4bbe2a..afb27cb6a7bd 100644
- --- a/include/drm/drm_ioctl.h
- +++ b/include/drm/drm_ioctl.h
- @@ -68,6 +68,7 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
- unsigned long arg);
- #define DRM_IOCTL_NR(n) _IOC_NR(n)
- +#define DRM_IOCTL_TYPE(n) _IOC_TYPE(n)
- #define DRM_MAJOR 226
- /**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement