drm/amd/amdgpu: validate the shadow BO.
authorAlex Xie <AlexBin.Xie@amd.com>
Wed, 30 Nov 2016 22:19:40 +0000 (17:19 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Dec 2016 23:08:32 +0000 (18:08 -0500)
commit1cd99a8d97c90e04d526d843f2be950f6e4e3bd2
tree08a90e16d035a87e91bdb7e64aebab0e262e2912
parentf5f857f45d3371d032f016dd9f123a93bdf3eefc
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
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c