提交 6b8ac638 编写于 作者: E Eric Anholt

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: NIngo Molnar <mingo@kernel.org>
Signed-off-by: NEric Anholt <eric@anholt.net>
Fixes: d5b1a78a ("drm/vc4: Add support for drawing 3D frames.")
上级 0f2ff82e
......@@ -601,6 +601,7 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec)
sizeof(struct vc4_shader_state)) ||
temp_size < exec_size) {
DRM_ERROR("overflow in exec arguments\n");
ret = -EINVAL;
goto fail;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册