提交 eb174c77 编写于 作者: R Roger He 提交者: Alex Deucher

drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence

Fixes an oops in amdgpu_cs_wait_any_fence.
Reviewed-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NChunming Zhou <david1.zhou@amd.com>
Signed-off-by: NRoger He <Hongbo.He@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 fd78e6af
......@@ -1498,7 +1498,7 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,
wait->out.status = (r > 0);
wait->out.first_signaled = first;
if (array[first])
if (first < fence_count && array[first])
r = array[first]->error;
else
r = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册