Skip to content

Commit 6fb15dc

Browse files
peppsacalexdeucher
authored andcommitted
drm/radeon: check bo_va->bo is non-NULL before using it
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 <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0ad4b4a commit 6fb15dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/radeon/radeon_gem.c

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

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

648648
error_unlock:

0 commit comments

Comments
 (0)