]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
amdkfd: destroy kfd secondary contexts through fd close
authorZhu Lingshan <lingshan.zhu@amd.com>
Mon, 28 Oct 2024 07:55:01 +0000 (15:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Dec 2025 18:56:41 +0000 (13:56 -0500)
commit65cce2a172ff0f8b4a2d74a6c9a84243b94ca797
tree54f5adbb52f0dcfbb9cf96fd6b04ba1063c2c223
parent4cd255b9694647b784f085ae144b727b6ffdfbfc
amdkfd: destroy kfd secondary contexts through fd close

Life cycle of a KFD secondary context(kfd_process) is tied
to the opened file. Therefore this commit destroy a kfd
secondary context when close the fd it belonging to.

This commit extracts the code removing the kfd_process
from the kfd_process_table to a separate function and
call it in kfd_process_notifier_release_internal unconditionally.

Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c