Files
linux/drivers/gpu/drm/amd/amdgpu
Harish Kasiviswanathan 6b61a54e68 drm/amdgpu: Fix double deletion of validate_list
If amdgpu_amdkfd_gpuvm_free_memory_of_gpu() fails after kgd_mem is
removed from validate_list, the mem handle still lingers in the KFD idr.
This means when process is terminated,
kfd_process_free_outstanding_kfd_bos() will call
amdgpu_amdkfd_gpuvm_free_memory_of_gpu() again resulting in double
deletion.

To avoid this -
 (a) Check if list is empty before deleting it
 (b) Rearragne amdgpu_amdkfd_gpuvm_free_memory_of_gpu() such that it can
     be safely called again if it returns failure the first time.

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 6ba60345f4)
2026-02-03 17:24:21 -05:00
..
2025-04-07 15:18:34 -04:00
2024-07-24 17:30:23 -04:00
2025-10-13 14:14:15 -04:00
2024-11-03 01:28:06 -05:00
2024-07-24 17:30:23 -04:00
2024-07-24 17:30:23 -04:00
2026-01-28 16:34:24 -05:00
2025-03-26 17:44:34 -04:00
2025-03-05 10:37:13 -05:00
2025-09-18 09:43:02 -04:00