aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorRoger He <[email protected]>2017-11-17 04:45:18 +0000
committerAlex Deucher <[email protected]>2017-11-17 20:00:52 +0000
commiteb174c77e258f93b0f1046afd23a0aede68be3f2 (patch)
tree5b37f43a6b654585861c61402630acbf5888ce73 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdrm/amd/powerplay: fix unfreeze level smc message for smu7 (diff)
downloadkernel-eb174c77e258f93b0f1046afd23a0aede68be3f2.tar.gz
kernel-eb174c77e258f93b0f1046afd23a0aede68be3f2.zip
drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence
Fixes an oops in amdgpu_cs_wait_any_fence. Reviewed-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Roger He <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 146e05f21d35..bdef497a6a26 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1498,7 +1498,7 @@ out:
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;