aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-07 05:30:46 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-07 08:02:14 -0400
commitdc257cf154be708ecc47b8b89c12ad8cd2cc35e4 (patch)
tree625d57ef6c42030cc1ce1842d4efc105e284bc3d /drivers/gpu/drm/i915/i915_gem_execbuffer.c
parent5bc69bf9aeb73547cad8e1ce683a103fe9728282 (diff)
parentd48b97b403d23f6df0b990cee652bdf9a52337a3 (diff)
Merge tag 'v3.4-rc6' into drm-intel-next
Conflicts: drivers/gpu/drm/i915/intel_display.c Ok, this is a fun story of git totally messing things up. There /shouldn't/ be any conflict in here, because the fixes in -rc6 do only touch functions that have not been changed in -next. The offending commits in drm-next are 14415745b2..1fa611065 which simply move a few functions from intel_display.c to intel_pm.c. The problem seems to be that git diff gets completely confused: $ git diff 14415745b2..1fa611065 is a nice mess in intel_display.c, and the diff leaks into totally unrelated functions, whereas $git diff --minimal 14415745b2..1fa611065 is exactly what we want. Unfortunately there seems to be no way to teach similar smarts to the merge diff and conflict generation code, because with the minimal diff there really shouldn't be any conflicts. For added hilarity, every time something in that area changes the + and - lines in the diff move around like crazy, again resulting in new conflicts. So I fear this mess will stay with us for a little longer (and might result in another backmerge down the road). 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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 68ec0130a626..c77bfa9ad340 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1116,6 +1116,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
1116 return -EINVAL; 1116 return -EINVAL;
1117 } 1117 }
1118 1118
1119 if (args->num_cliprects > UINT_MAX / sizeof(*cliprects)) {
1120 DRM_DEBUG("execbuf with %u cliprects\n",
1121 args->num_cliprects);
1122 return -EINVAL;
1123 }
1119 cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects), 1124 cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects),
1120 GFP_KERNEL); 1125 GFP_KERNEL);
1121 if (cliprects == NULL) { 1126 if (cliprects == NULL) {
@@ -1387,7 +1392,8 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
1387 struct drm_i915_gem_exec_object2 *exec2_list = NULL; 1392 struct drm_i915_gem_exec_object2 *exec2_list = NULL;
1388 int ret; 1393 int ret;
1389 1394
1390 if (args->buffer_count < 1) { 1395 if (args->buffer_count < 1 ||
1396 args->buffer_count > UINT_MAX / sizeof(*exec2_list)) {
1391 DRM_DEBUG("execbuf2 with %d buffers\n", args->buffer_count); 1397 DRM_DEBUG("execbuf2 with %d buffers\n", args->buffer_count);
1392 return -EINVAL; 1398 return -EINVAL;
1393 } 1399 }