[PATCH v2] drm/radeon: check bo_va->bo is non-NULL before using it
Christian König
christian.koenig at amd.com
Wed Jun 26 10:54:21 UTC 2024
Am 25.06.24 um 19:44 schrieb Alex Deucher:
> On Tue, Jun 25, 2024 at 10:32 AM Pierre-Eric Pelloux-Prayer
> <pierre-eric.pelloux-prayer at amd.com> wrote:
>> 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 at amd.com>
> Acked-by: Alex Deucher <alexander.deucher at amd.com>
Should I push this to drm-misc-fixes or should Pierre push it to
amd-staging-drm-next?
Might take some minor work from you when you start to handle radeon
change as well.
Regards,
Christian.
>
>> ---
>> drivers/gpu/drm/radeon/radeon_gem.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
>> index 3fec3acdaf28..27225d1fe8d2 100644
>> --- a/drivers/gpu/drm/radeon/radeon_gem.c
>> +++ b/drivers/gpu/drm/radeon/radeon_gem.c
>> @@ -641,7 +641,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:
>> --
>> 2.45.2
>>
More information about the amd-gfx
mailing list