Skip to content

Commit d61d1e9

Browse files
committed
drm/vc4: Return -EINVAL on the overflow checks failing.
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 <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Fixes: d5b1a78 ("drm/vc4: Add support for drawing 3D frames.") (cherry picked from commit 6b8ac63)
1 parent 1661057 commit d61d1e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/vc4/vc4_gem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec)
601601
sizeof(struct vc4_shader_state)) ||
602602
temp_size < exec_size) {
603603
DRM_ERROR("overflow in exec arguments\n");
604+
ret = -EINVAL;
604605
goto fail;
605606
}
606607

0 commit comments

Comments
 (0)