All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/amdgpu: Fix possible null pointer dereference
@ 2023-11-07 16:58 Felix Kuehling
  2023-11-07 16:58 ` [PATCH 2/6] drm/amdgpu: New VM state for evicted user BOs Felix Kuehling
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Felix Kuehling @ 2023-11-07 16:58 UTC (permalink / raw)
  To: amd-gfx; +Cc: xiaogang.chen, ramesh.errabolu, christian.koenig

mem = bo->tbo.resource may be NULL in amdgpu_vm_bo_update.

Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 7b2a7c9156f0..1442d97ddd0f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1015,8 +1015,8 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
 				bo = gem_to_amdgpu_bo(gobj);
 		}
 		mem = bo->tbo.resource;
-		if (mem->mem_type == TTM_PL_TT ||
-		    mem->mem_type == AMDGPU_PL_PREEMPT)
+		if (mem && (mem->mem_type == TTM_PL_TT ||
+			    mem->mem_type == AMDGPU_PL_PREEMPT))
 			pages_addr = bo->tbo.ttm->dma_address;
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-11-17 16:30 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07 16:58 [PATCH 1/6] drm/amdgpu: Fix possible null pointer dereference Felix Kuehling
2023-11-07 16:58 ` [PATCH 2/6] drm/amdgpu: New VM state for evicted user BOs Felix Kuehling
2023-11-07 22:11   ` Felix Kuehling
2023-11-08 12:28     ` Christian König
2023-11-08 21:23       ` Felix Kuehling
2023-11-09  8:12         ` Christian König
2023-11-14 22:26           ` Felix Kuehling
2023-11-07 16:58 ` [PATCH 3/6] drm/amdgpu: Auto-validate DMABuf imports in compute VMs Felix Kuehling
2023-11-07 20:24   ` Joshi, Mukul
2023-11-07 16:58 ` [PATCH 4/6] drm/amdkfd: Export DMABufs from KFD using GEM handles Felix Kuehling
2023-11-07 19:44   ` Errabolu, Ramesh
2023-11-07 19:56     ` Felix Kuehling
2023-11-08  2:08       ` Errabolu, Ramesh
2023-11-16 21:53   ` Felix Kuehling
2023-11-17 16:30     ` Christian König
2023-11-07 16:58 ` [PATCH 5/6] drm/amdkfd: Import DMABufs for interop through DRM Felix Kuehling
2023-11-08  0:01   ` Errabolu, Ramesh
2023-11-08 23:20   ` Chen, Xiaogang
2023-11-08 23:26     ` Felix Kuehling
2023-11-08 23:41       ` Chen, Xiaogang
2023-11-09  8:16   ` Christian König
2023-11-07 16:58 ` [PATCH 6/6] drm/amdkfd: Bump KFD ioctl version Felix Kuehling
2023-11-08 12:11 ` [PATCH 1/6] drm/amdgpu: Fix possible null pointer dereference Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.