]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/i915: disallow gem ums init ioctl for kms
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 24 Apr 2012 06:22:52 +0000 (08:22 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 3 May 2012 09:18:13 +0000 (11:18 +0200)
This ioctl used in a kms driver is only useful to create massive
havoc.

v2: Bail out with -ENODEV as suggested by Chris Wilson.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c

index b402d70dc78b65e31d2223e1e3265a23b597111f..1b808d0419498894f415f2ad727aab55b8b25496 100644 (file)
@@ -140,6 +140,9 @@ i915_gem_init_ioctl(struct drm_device *dev, void *data,
 {
        struct drm_i915_gem_init *args = data;
 
+       if (drm_core_check_feature(dev, DRIVER_MODESET))
+               return -ENODEV;
+
        if (args->gtt_start >= args->gtt_end ||
            (args->gtt_end | args->gtt_start) & (PAGE_SIZE - 1))
                return -EINVAL;