drm/radeon: check bo_va->bo is non-NULL before using it
authorjsg <jsg@openbsd.org>
Fri, 26 Jul 2024 03:42:02 +0000 (03:42 +0000)
committerjsg <jsg@openbsd.org>
Fri, 26 Jul 2024 03:42:02 +0000 (03:42 +0000)
From Pierre-Eric Pelloux-Prayer
f13c96e0e325a057c03f8a47734adb360e112efe in linux-6.6.y/6.6.42
6fb15dcbcf4f212930350eaee174bb60ed40a536 in mainline linux

sys/dev/pci/drm/radeon/radeon_gem.c

index 18c35ad..b9db67c 100644 (file)
@@ -734,7 +734,7 @@ static void radeon_gem_va_update_vm(struct radeon_device *rdev,
        if (r)
                goto error_unlock;
 
-       if (bo_va->it.start)
+       if (bo_va->it.start && bo_va->bo)
                r = radeon_vm_bo_update(rdev, bo_va, bo_va->bo->tbo.resource);
 
 error_unlock: