diff options
| author | Christian König <[email protected]> | 2021-12-10 08:39:27 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2021-12-17 10:26:40 +0000 |
| commit | fc74881c28d314b10efac016ef49df4ff40b8b97 (patch) | |
| tree | c4b8798dd31055a853380159b22f7734c44f66f5 /drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | |
| parent | drm/ast: potential dereference of null pointer (diff) | |
| download | kernel-fc74881c28d314b10efac016ef49df4ff40b8b97.tar.gz kernel-fc74881c28d314b10efac016ef49df4ff40b8b97.zip | |
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]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index ae6ab93c868b..7444484a12bf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c @@ -384,7 +384,7 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach) struct amdgpu_vm_bo_base *bo_base; int r; - if (bo->tbo.resource->mem_type == TTM_PL_SYSTEM) + if (!bo->tbo.resource || bo->tbo.resource->mem_type == TTM_PL_SYSTEM) return; r = ttm_bo_validate(&bo->tbo, &placement, &ctx); |
