mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 17:14:40 +08:00
drm/i915: disallow gem ums init ioctl for kms
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>
This commit is contained in:
parent
1cff8f6b4c
commit
7bb6fb8dd9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user