drm/vmwgfx: Fix breakage introduced by commit "drm: block userspace under allocating...
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 30 Sep 2010 10:18:33 +0000 (12:18 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 1 Oct 2010 11:08:48 +0000 (21:08 +1000)
The mentioned commit breaks the vmwgfx ioctl argument sanity check.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

index 72ec2e2b6e9787196ca1de65f28e4c6a0f090051..292aeba385e0e8539b9d87b49a0624b49aebfda8 100644 (file)
@@ -500,7 +500,7 @@ static long vmw_unlocked_ioctl(struct file *filp, unsigned int cmd,
                struct drm_ioctl_desc *ioctl =
                    &vmw_ioctls[nr - DRM_COMMAND_BASE];
 
-               if (unlikely(ioctl->cmd != cmd)) {
+               if (unlikely(ioctl->cmd_drv != cmd)) {
                        DRM_ERROR("Invalid command format, ioctl %d\n",
                                  nr - DRM_COMMAND_BASE);
                        return -EINVAL;