diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem_userptr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/i915_gem_userptr.c b/sys/dev/pci/drm/i915/i915_gem_userptr.c index cfef42c2bf0..781419bed4b 100644 --- a/sys/dev/pci/drm/i915/i915_gem_userptr.c +++ b/sys/dev/pci/drm/i915/i915_gem_userptr.c @@ -846,6 +846,9 @@ i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file I915_USERPTR_UNSYNCHRONIZED)) return -EINVAL; + if (!args->user_size) + return -EINVAL; + if (offset_in_page(args->user_ptr | args->user_size)) return -EINVAL; |