projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4e7b89
)
drm: Avoid oops in GEM execbuffers with bad arguments.
author
Eric Anholt
<eric@anholt.net>
Wed, 10 Sep 2008 21:22:49 +0000
(14:22 -0700)
committer
Dave Airlie
<airlied@linux.ie>
Fri, 17 Oct 2008 21:10:52 +0000
(07:10 +1000)
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i915/i915_gem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/i915/i915_gem.c
b/drivers/gpu/drm/i915/i915_gem.c
index 5fe50343de11910ba30f64477c52ac31710c0b63..29d9d21e9413f65cf11ae88ecf618777046b1b8f 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_gem.c
+++ b/
drivers/gpu/drm/i915/i915_gem.c
@@
-1763,6
+1763,10
@@
i915_gem_execbuffer(struct drm_device *dev, void *data,
(int) args->buffers_ptr, args->buffer_count, args->batch_len);
#endif
+ if (args->buffer_count < 1) {
+ DRM_ERROR("execbuf with %d buffers\n", args->buffer_count);
+ return -EINVAL;
+ }
/* Copy in the exec list from userland */
exec_list = drm_calloc(sizeof(*exec_list), args->buffer_count,
DRM_MEM_DRIVER);