Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Oleg Nesterov and committed by
Andrew Morton
a87da7a9 7d08e091

-13
-3
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 2551 2551 vm->task_info->task.pid = current->pid; 2552 2552 get_task_comm(vm->task_info->task.comm, current); 2553 2553 2554 - if (current->group_leader->mm != current->mm) 2555 - return; 2556 - 2557 2554 vm->task_info->tgid = current->tgid; 2558 2555 get_task_comm(vm->task_info->process_name, current->group_leader); 2559 2556 }
-10
drivers/gpu/drm/amd/amdkfd/kfd_process.c
··· 833 833 if (!(thread->mm && mmget_not_zero(thread->mm))) 834 834 return ERR_PTR(-EINVAL); 835 835 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 - 842 836 /* If the process just called exec(3), it is possible that the 843 837 * cleanup of the kfd_process (following the release of the mm 844 838 * of the old process image) is still in the cleanup work queue. ··· 910 916 struct kfd_process *process; 911 917 912 918 if (!thread->mm) 913 - return ERR_PTR(-EINVAL); 914 - 915 - /* Only the pthreads threading model is supported. */ 916 - if (thread->group_leader->mm != thread->mm) 917 919 return ERR_PTR(-EINVAL); 918 920 919 921 process = find_process(thread, false);