Skip to content

Commit a87da7a

Browse files
oleg-nesterovakpm00
authored andcommitted
drm/amd: kill the outdated "Only the pthreads threading model is supported" checks
Nowadays task->group_leader->mm != task->mm is only possible if a) task is not a group leader and b) task->group_leader->mm == NULL because task->group_leader has already exited using sys_exit(). I don't think that drm/amd tries to detect/nack this case. Link: https://lkml.kernel.org/r/aXY_yLVHd63UlWtm@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Christan König <christian.koenig@amd.com> Acked-by: Felix Kuehling <felix.kuehling@amd.com> Cc: Alice Ryhl <aliceryhl@google.com> Cc: Boris Brezillon <boris.brezillon@collabora.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 7d08e09 commit a87da7a

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2551,9 +2551,6 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
25512551
vm->task_info->task.pid = current->pid;
25522552
get_task_comm(vm->task_info->task.comm, current);
25532553

2554-
if (current->group_leader->mm != current->mm)
2555-
return;
2556-
25572554
vm->task_info->tgid = current->tgid;
25582555
get_task_comm(vm->task_info->process_name, current->group_leader);
25592556
}

drivers/gpu/drm/amd/amdkfd/kfd_process.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -833,12 +833,6 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
833833
if (!(thread->mm && mmget_not_zero(thread->mm)))
834834
return ERR_PTR(-EINVAL);
835835

836-
/* Only the pthreads threading model is supported. */
837-
if (thread->group_leader->mm != thread->mm) {
838-
mmput(thread->mm);
839-
return ERR_PTR(-EINVAL);
840-
}
841-
842836
/* If the process just called exec(3), it is possible that the
843837
* cleanup of the kfd_process (following the release of the mm
844838
* of the old process image) is still in the cleanup work queue.
@@ -918,10 +912,6 @@ struct kfd_process *kfd_get_process(const struct task_struct *thread)
918912
if (!thread->mm)
919913
return ERR_PTR(-EINVAL);
920914

921-
/* Only the pthreads threading model is supported. */
922-
if (thread->group_leader->mm != thread->mm)
923-
return ERR_PTR(-EINVAL);
924-
925915
process = find_process(thread, false);
926916
if (!process)
927917
return ERR_PTR(-EINVAL);

0 commit comments

Comments
 (0)