aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorAlex Xie <[email protected]>2016-11-30 22:19:40 +0000
committerAlex Deucher <[email protected]>2016-12-06 23:08:32 +0000
commit1cd99a8d97c90e04d526d843f2be950f6e4e3bd2 (patch)
tree08a90e16d035a87e91bdb7e64aebab0e262e2912 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdrm/amd/powerplay: disable cg pg task when pp uninitialize. (diff)
downloadkernel-1cd99a8d97c90e04d526d843f2be950f6e4e3bd2.tar.gz
kernel-1cd99a8d97c90e04d526d843f2be950f6e4e3bd2.zip
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 <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [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 5a277495d6a3..29d6d84d1c28 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -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;
}