From: Pierre-Eric Pelloux-Prayer Date: Mon, 24 Nov 2025 14:42:50 +0000 (+0100) Subject: drm/amdgpu: free job fences on failure in amdgpu_job_alloc_with_ib X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=e60573b5980219ad09bb78a014d2fa8664337cf1;p=linux%2F.git drm/amdgpu: free job fences on failure in amdgpu_job_alloc_with_ib Otherwise we're leaking memory. Fixes: db36632ea51e ("drm/amdgpu: clean up and unify hw fence handling") Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index 0707d2c2326f..0a0dcbf0798d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c @@ -246,6 +246,8 @@ int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, if (r) { if (entity) drm_sched_job_cleanup(&(*job)->base); + kfree((*job)->hw_vm_fence); + kfree((*job)->hw_fence); kfree(*job); *job = NULL; }