Skip to content

Commit fc74881

Browse files
Christian KönigChristianKoenigAMD
authored andcommitted
drm/amdgpu: fix dropped backing store handling in amdgpu_dma_buf_move_notify
bo->tbo.resource can now be NULL. Signed-off-by: Christian König <[email protected]> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1811 Acked-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent fea3fdf commit fc74881

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)
384384
struct amdgpu_vm_bo_base *bo_base;
385385
int r;
386386

387-
if (bo->tbo.resource->mem_type == TTM_PL_SYSTEM)
387+
if (!bo->tbo.resource || bo->tbo.resource->mem_type == TTM_PL_SYSTEM)
388388
return;
389389

390390
r = ttm_bo_validate(&bo->tbo, &placement, &ctx);

0 commit comments

Comments
 (0)