Skip to content

Commit 7d08e09

Browse files
oleg-nesterovakpm00
authored andcommitted
drm/amdgpu: don't abuse current->group_leader
Cleanup and preparation to simplify the next changes. - Use current->tgid instead of current->group_leader->pid - Use get_task_pid(current, PIDTYPE_TGID) instead of get_task_pid(current->group_leader, PIDTYPE_PID) Link: https://lkml.kernel.org/r/aXY_wKewzV5lCa5I@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Felix Kuehling <felix.kuehling@amd.com> Cc: Alice Ryhl <aliceryhl@google.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Christan König <christian.koenig@amd.com> Cc: David S. Miller <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Leon Romanovsky <leon@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: Simon Horman <horms@kernel.org> Cc: Steven Price <steven.price@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent a170919 commit 7d08e09

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
14211421
goto create_evict_fence_fail;
14221422
}
14231423

1424-
info->pid = get_task_pid(current->group_leader, PIDTYPE_PID);
1424+
info->pid = get_task_pid(current, PIDTYPE_TGID);
14251425
INIT_DELAYED_WORK(&info->restore_userptr_work,
14261426
amdgpu_amdkfd_restore_userptr_worker);
14271427

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2554,7 +2554,7 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
25542554
if (current->group_leader->mm != current->mm)
25552555
return;
25562556

2557-
vm->task_info->tgid = current->group_leader->pid;
2557+
vm->task_info->tgid = current->tgid;
25582558
get_task_comm(vm->task_info->process_name, current->group_leader);
25592559
}
25602560

0 commit comments

Comments
 (0)