artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63ed879
)
drm/i915/userptr: reject zero user_size
author
jsg
<jsg@openbsd.org>
Thu, 13 Sep 2018 03:45:08 +0000
(
03:45
+0000)
committer
jsg
<jsg@openbsd.org>
Thu, 13 Sep 2018 03:45:08 +0000
(
03:45
+0000)
From Matthew Auld
182e963432d867384f2e55487ec60ca7a9f99cd1
in linux 4.4.y/4.4.155
c11c7bfd213495784b22ef82a69b6489f8d0092f
in mainline linux
sys/dev/pci/drm/i915/i915_gem_userptr.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/i915/i915_gem_userptr.c
b/sys/dev/pci/drm/i915/i915_gem_userptr.c
index
cfef42c
..
781419b
100644
(file)
--- 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;