aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-06-20 12:03:41 +1000
committerDave Airlie <airlied@redhat.com>2008-06-20 12:03:41 +1000
commit8712f0a17bb135d4ad3eb85b30f47c561cf9c148 (patch)
tree419614056dee825d2e5a2f15784349cb466310c8 /linux-core/drm_drv.c
parent00f549bd5f40d9ad6ec7164cd01646ed468b9a4a (diff)
drm: fix the ioctl to not believe userspace.
believing userspace causes oopses
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r--linux-core/drm_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 609fc838..b375fa1b 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -631,6 +631,8 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
goto err_i1;
}
#endif
+ cmd = ioctl->cmd;
+
func = ioctl->func;
/* is there a local override? */
if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl)