Skip to content

Commit 8a500b3

Browse files
peppsacgregkh
authored andcommitted
drm/radeon: check bo_va->bo is non-NULL before using it
[ Upstream commit 6fb15dc ] The call to radeon_vm_clear_freed might clear bo_va->bo, so we have to check it before dereferencing it. Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 94166fe commit 8a500b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/radeon/radeon_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ static void radeon_gem_va_update_vm(struct radeon_device *rdev,
641641
if (r)
642642
goto error_unlock;
643643

644-
if (bo_va->it.start)
644+
if (bo_va->it.start && bo_va->bo)
645645
r = radeon_vm_bo_update(rdev, bo_va, bo_va->bo->tbo.resource);
646646

647647
error_unlock:

0 commit comments

Comments
 (0)