From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
"Boris Brezillon" <boris.brezillon@collabora.com>,
"Christian König" <christian.koenig@amd.com>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Leon Romanovsky" <leon@kernel.org>,
"Steven Price" <steven.price@arm.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org
Subject: [PATCH v2 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks
Date: Sun, 25 Jan 2026 17:07:36 +0100 [thread overview]
Message-ID: <aXY_yLVHd63UlWtm@redhat.com> (raw)
In-Reply-To: <aXY_h8i78n6yD9JY@redhat.com>
Nowaday 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.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 10 ----------
2 files changed, 13 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index a0f8ba382b9e..e44f158a11f0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -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);
}
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index a085faac9fe1..f8ef18a3aa71 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -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);
--
2.52.0
next prev parent reply other threads:[~2026-01-26 8:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 16:06 [PATCH v2 0/7] don't abuse task_struct.group_leader Oleg Nesterov
2026-01-25 16:07 ` [PATCH v2 1/7] android/binder: don't abuse current->group_leader Oleg Nesterov
2026-01-25 16:07 ` [PATCH v2 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap() Oleg Nesterov
2026-01-25 16:07 ` [PATCH v2 3/7] drm/amdgpu: don't abuse current->group_leader Oleg Nesterov
2026-01-25 16:07 ` Oleg Nesterov [this message]
2026-01-25 16:07 ` [PATCH v2 5/7] drm/pan*: " Oleg Nesterov
2026-01-25 16:07 ` [PATCH v2 6/7] RDMA/umem: " Oleg Nesterov
2026-01-25 16:08 ` [PATCH v2 7/7] netclassid: use thread_group_leader(p) in update_classid_task() Oleg Nesterov
2026-01-25 19:37 ` Jakub Kicinski
2026-01-26 20:50 ` Andrew Morton
2026-01-26 20:53 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aXY_yLVHd63UlWtm@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aliceryhl@google.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=boris.brezillon@collabora.com \
--cc=christian.koenig@amd.com \
--cc=davem@davemloft.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@google.com \
--cc=felix.kuehling@amd.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steven.price@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.