diff options
| author | Asad Kamal <[email protected]> | 2024-04-25 18:26:55 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-05-02 20:18:18 +0000 |
| commit | 6cd2b872643bb29bba01a8ac739138db7bd79007 (patch) | |
| tree | be17781be5a473239518d7367819429b523b176e /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | drm/amd/display: Fix index may exceed array range within fpu_update_bw_boundi... (diff) | |
| download | kernel-6cd2b872643bb29bba01a8ac739138db7bd79007.tar.gz kernel-6cd2b872643bb29bba01a8ac739138db7bd79007.zip | |
drm/amd/amdgpu: Check tbo resource pointer
Validate tbo resource pointer, skip if NULL
Signed-off-by: Asad Kamal <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 7a6e3d13a454..77f6fd50002a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -5012,7 +5012,8 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev) shadow = vmbo->shadow; /* No need to recover an evicted BO */ - if (shadow->tbo.resource->mem_type != TTM_PL_TT || + if (!shadow->tbo.resource || + shadow->tbo.resource->mem_type != TTM_PL_TT || shadow->tbo.resource->start == AMDGPU_BO_INVALID_OFFSET || shadow->parent->tbo.resource->mem_type != TTM_PL_VRAM) continue; |
