]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: free hw_vm_fence when fail in amdgpu_job_alloc
authorJiqian Chen <Jiqian.Chen@amd.com>
Wed, 14 Jan 2026 10:06:10 +0000 (18:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Jan 2026 02:50:03 +0000 (21:50 -0500)
commit8e96b36d9bfd841e14ee8f9e1b77145e52fff3a3
tree885840f626c02619e9fa77fb8d7a38ce7ed8788b
parent10343253328e0dbdb465bff709a2619a08fe01ad
drm/amdgpu: free hw_vm_fence when fail in amdgpu_job_alloc

If drm_sched_job_init fails, hw_vm_fence is not freed currently,
then cause memory leak.

Fixes: db36632ea51e ("drm/amdgpu: clean up and unify hw fence handling")
Link: https://lore.kernel.org/amd-gfx/a5a828cb-0e4a-41f0-94c3-df31e5ddad52@amd.com/T/#t
Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com>
Reviewed-by: Amos Kong <kongjianjun@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5d42ee457ccd1fb5da4c7f817825b2806ec36956)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c