diff options
author | Roger He <Hongbo.He@amd.com> | 2017-11-17 07:45:18 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-17 23:00:52 +0300 |
commit | eb174c77e258f93b0f1046afd23a0aede68be3f2 (patch) | |
tree | 5b37f43a6b654585861c61402630acbf5888ce73 /drivers/gpu | |
parent | fd78e6af810377363a2b3439b942840fa4f4ea86 (diff) | |
download | linux-eb174c77e258f93b0f1046afd23a0aede68be3f2.tar.xz |
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 <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 |
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; |