diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 07:39:59 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-08 07:39:59 -0400 |
commit | 5e13a0c5ec05d382b488a691dfb8af015b1dea1e (patch) | |
tree | 7a06dfa1f7661f8908193f2437b32452520221d3 /drivers/gpu/drm/i915/i915_gem_execbuffer.c | |
parent | b615b57a124a4af7b68196bc2fb8acc236041fa2 (diff) | |
parent | 4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd (diff) |
Merge remote-tracking branch 'airlied/drm-core-next' into drm-intel-next-queued
Backmerge of drm-next to resolve a few ugly conflicts and to get a few
fixes from 3.4-rc6 (which drm-next has already merged). Note that this
merge also restricts the stencil cache lra evict policy workaround to
snb (as it should) - I had to frob the code anyway because the
CM0_MASK_SHIFT define died in the masked bit cleanups.
We need the backmerge to get Paulo Zanoni's infoframe regression fix
for gm45 - further bugfixes from him touch the same area and would
needlessly conflict.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index a46ed26464f4..206b9bbe6979 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -1121,6 +1121,12 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
1121 | return -EINVAL; | 1121 | return -EINVAL; |
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | if (args->num_cliprects > UINT_MAX / sizeof(*cliprects)) { | ||
1125 | DRM_DEBUG("execbuf with %u cliprects\n", | ||
1126 | args->num_cliprects); | ||
1127 | return -EINVAL; | ||
1128 | } | ||
1129 | |||
1124 | cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects), | 1130 | cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects), |
1125 | GFP_KERNEL); | 1131 | GFP_KERNEL); |
1126 | if (cliprects == NULL) { | 1132 | if (cliprects == NULL) { |
@@ -1393,7 +1399,8 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data, | |||
1393 | struct drm_i915_gem_exec_object2 *exec2_list = NULL; | 1399 | struct drm_i915_gem_exec_object2 *exec2_list = NULL; |
1394 | int ret; | 1400 | int ret; |
1395 | 1401 | ||
1396 | if (args->buffer_count < 1) { | 1402 | if (args->buffer_count < 1 || |
1403 | args->buffer_count > UINT_MAX / sizeof(*exec2_list)) { | ||
1397 | DRM_DEBUG("execbuf2 with %d buffers\n", args->buffer_count); | 1404 | DRM_DEBUG("execbuf2 with %d buffers\n", args->buffer_count); |
1398 | return -EINVAL; | 1405 | return -EINVAL; |
1399 | } | 1406 | } |