From: jsg Date: Fri, 26 Jul 2024 03:42:02 +0000 (+0000) Subject: drm/radeon: check bo_va->bo is non-NULL before using it X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a7c1a79f55a21987dd2e0c2de6be17d16de06b54;p=openbsd drm/radeon: check bo_va->bo is non-NULL before using it From Pierre-Eric Pelloux-Prayer f13c96e0e325a057c03f8a47734adb360e112efe in linux-6.6.y/6.6.42 6fb15dcbcf4f212930350eaee174bb60ed40a536 in mainline linux --- diff --git a/sys/dev/pci/drm/radeon/radeon_gem.c b/sys/dev/pci/drm/radeon/radeon_gem.c index 18c35adb98c..b9db67ce876 100644 --- a/sys/dev/pci/drm/radeon/radeon_gem.c +++ b/sys/dev/pci/drm/radeon/radeon_gem.c @@ -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: