]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd: kill the outdated "Only the pthreads threading model is supported" checks
authorOleg Nesterov <oleg@redhat.com>
Sun, 25 Jan 2026 16:07:36 +0000 (17:07 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 3 Feb 2026 16:21:25 +0000 (08:21 -0800)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdkfd/kfd_process.c

index a0f8ba382b9ec8284cff5b220d6163d0ce16a18d..e44f158a11f0f48bff76ba31615eeeb97efb099f 100644 (file)
@@ -2551,9 +2551,6 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
        vm->task_info->task.pid = current->pid;
        get_task_comm(vm->task_info->task.comm, current);
 
-       if (current->group_leader->mm != current->mm)
-               return;
-
        vm->task_info->tgid = current->tgid;
        get_task_comm(vm->task_info->process_name, current->group_leader);
 }
index a085faac9fe1a4f5f59493cf667a260a05f84f87..f8ef18a3aa71d18d66a63df9b24266056a941f68 100644 (file)
@@ -833,12 +833,6 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
        if (!(thread->mm && mmget_not_zero(thread->mm)))
                return ERR_PTR(-EINVAL);
 
-       /* Only the pthreads threading model is supported. */
-       if (thread->group_leader->mm != thread->mm) {
-               mmput(thread->mm);
-               return ERR_PTR(-EINVAL);
-       }
-
        /* If the process just called exec(3), it is possible that the
         * cleanup of the kfd_process (following the release of the mm
         * 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)
        if (!thread->mm)
                return ERR_PTR(-EINVAL);
 
-       /* Only the pthreads threading model is supported. */
-       if (thread->group_leader->mm != thread->mm)
-               return ERR_PTR(-EINVAL);
-
        process = find_process(thread, false);
        if (!process)
                return ERR_PTR(-EINVAL);