amdkfd: properly free secondary context id
Subsystems (3)
PATCH 1/1 amdkfd: properly free secondary context id
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]>
--- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_process.c +1 -1
@@ -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);
Signature · 1 line
2.53.0
Quoted 7 lines · Zhu Lingshan
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]>
Quoted 17 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_process.c +1
-1@@ -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);