1
0
Fork 0

drm/amd/amdgpu: validate the shadow BO.

Fixes a rare NULL pointer dereference in amdgpu_ttm_bind.

The issue was found by Nicolai Haehnle.
The patch was tested by Nicolai Haehnle.

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
hifive-unleashed-5.1
Alex Xie 2016-11-30 17:19:40 -05:00 committed by Alex Deucher
parent f5f857f45d
commit 1cd99a8d97
1 changed files with 1 additions and 1 deletions

View File

@ -451,7 +451,7 @@ static int amdgpu_cs_validate(void *param, struct amdgpu_bo *bo)
return r;
if (bo->shadow)
r = amdgpu_cs_bo_validate(p, bo);
r = amdgpu_cs_bo_validate(p, bo->shadow);
return r;
}