aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-01-17 05:58:06 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-01 02:33:03 -0500
commitcfba2a001d0e36905016bb4f87fc47245c944c36 (patch)
treed1c8fa2050a4fc71705cf3eb8d854b32d0c59778 /drivers/gpu/drm
parentb9edac54cb85da589ca809bf8dcf86e5cd3f41c0 (diff)
drm/vc4: Return -EINVAL on the overflow checks failing.
commit 6b8ac63847bc2f958dd93c09edc941a0118992d9 upstream. By failing to set the errno, we'd continue on to trying to set up the RCL, and then oops on trying to dereference the tile_bo that binning validation should have set up. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/vc4/vc4_gem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 39ef6743d3b8..18e37171e9c8 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -601,6 +601,7 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec)
601 sizeof(struct vc4_shader_state)) || 601 sizeof(struct vc4_shader_state)) ||
602 temp_size < exec_size) { 602 temp_size < exec_size) {
603 DRM_ERROR("overflow in exec arguments\n"); 603 DRM_ERROR("overflow in exec arguments\n");
604 ret = -EINVAL;
604 goto fail; 605 goto fail;
605 } 606 }
606 607