On 2026-07-01 04:14, Zhu Lingshan wrote:
Function kfd_process_free_id() should skip over the primary kfd process because its context id is fixed assigned, not allocated through the ida table. This function should only work on secondary contexts.Fixes: fac682a1d1af ("amdkfd: identify a secondary kfd process by its id") Signed-off-by: Zhu Lingshan <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 8e701dcda8ec..d0c083e018b2 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -931,7 +931,7 @@ static void kfd_process_free_id(struct kfd_process *process) { struct kfd_process *primary_process;- if (process->context_id != KFD_CONTEXT_ID_PRIMARY)+ if (process->context_id == KFD_CONTEXT_ID_PRIMARY) return;primary_process = kfd_lookup_process_by_mm(process->lead_thread->mm);
