drm: fix the ioctl to not believe userspace.

believing userspace causes oopses
main
Dave Airlie 2008-06-20 12:03:41 +10:00
parent 00f549bd5f
commit 8712f0a17b
1 changed files with 2 additions and 0 deletions

View File

@ -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)