* [PATCH 0/7] don't abuse task_struct.group_leader
@ 2025-12-07 12:38 Oleg Nesterov
2025-12-07 12:39 ` [PATCH 1/7] android/binder: don't abuse current->group_leader Oleg Nesterov
` (6 more replies)
0 siblings, 7 replies; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:38 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
Hello.
Untested but hopefully trivial, please review.
The patches do not depend on each other, this series just removes
the usage of ->group_leader when it is "obviously unnecessary".
I am going to move ->group_leader from task_struct to signal_struct
or at least add the new task_group_leader() helper. So I will send
more tree-wide changes on top of this series.
If this series passes the review, can it be routed via mm tree?
Oleg.
---
drivers/android/binder.c | 9 ++++-----
drivers/android/binder_alloc.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +----
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 10 ----------
drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
drivers/gpu/drm/panthor/panthor_gem.c | 2 +-
drivers/infiniband/core/umem_odp.c | 4 ++--
net/core/netclassid_cgroup.c | 2 +-
9 files changed, 12 insertions(+), 26 deletions(-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/7] android/binder: don't abuse current->group_leader
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
@ 2025-12-07 12:39 ` Oleg Nesterov
2025-12-18 11:06 ` Alice Ryhl
2025-12-07 12:39 ` [PATCH 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap() Oleg Nesterov
` (5 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:39 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
Cleanup and preparation to simplify the next changes.
- Use current->tgid instead of current->group_leader->pid
- Use the value returned by get_task_struct() to initialize proc->tsk
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
drivers/android/binder.c | 7 +++----
drivers/android/binder_alloc.c | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index a3a1b5c33ba3..a00f6678f04d 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -6044,7 +6044,7 @@ static int binder_open(struct inode *nodp, struct file *filp)
bool existing_pid = false;
binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%s: %d:%d\n", __func__,
- current->group_leader->pid, current->pid);
+ current->tgid, current->pid);
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL)
@@ -6053,8 +6053,8 @@ static int binder_open(struct inode *nodp, struct file *filp)
dbitmap_init(&proc->dmap);
spin_lock_init(&proc->inner_lock);
spin_lock_init(&proc->outer_lock);
- get_task_struct(current->group_leader);
- proc->tsk = current->group_leader;
+ proc->tsk = get_task_struct(current->group_leader);
+ proc->pid = current->tgid;
proc->cred = get_cred(filp->f_cred);
INIT_LIST_HEAD(&proc->todo);
init_waitqueue_head(&proc->freeze_wait);
@@ -6073,7 +6073,6 @@ static int binder_open(struct inode *nodp, struct file *filp)
binder_alloc_init(&proc->alloc);
binder_stats_created(BINDER_STAT_PROC);
- proc->pid = current->group_leader->pid;
INIT_LIST_HEAD(&proc->delivered_death);
INIT_LIST_HEAD(&proc->delivered_freeze);
INIT_LIST_HEAD(&proc->waiting_threads);
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 979c96b74cad..145ed5f14cdb 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -1233,7 +1233,7 @@ static struct shrinker *binder_shrinker;
VISIBLE_IF_KUNIT void __binder_alloc_init(struct binder_alloc *alloc,
struct list_lru *freelist)
{
- alloc->pid = current->group_leader->pid;
+ alloc->pid = current->tgid;
alloc->mm = current->mm;
mmgrab(alloc->mm);
mutex_init(&alloc->mutex);
--
2.52.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap()
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
2025-12-07 12:39 ` [PATCH 1/7] android/binder: don't abuse current->group_leader Oleg Nesterov
@ 2025-12-07 12:39 ` Oleg Nesterov
2025-12-18 11:05 ` Alice Ryhl
2025-12-07 12:39 ` [PATCH 3/7] drm/amdgpu: don't abuse current->group_leader Oleg Nesterov
` (4 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:39 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
With or without this change the checked condition can be falsely true
if proc->tsk execs, but this is fine: binder_alloc_mmap_handler() checks
vma->vm_mm == alloc->mm.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
drivers/android/binder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index a00f6678f04d..980bb13228fc 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -6013,7 +6013,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
{
struct binder_proc *proc = filp->private_data;
- if (proc->tsk != current->group_leader)
+ if (!same_thread_group(proc->tsk, current))
return -EINVAL;
binder_debug(BINDER_DEBUG_OPEN_CLOSE,
--
2.52.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/7] drm/amdgpu: don't abuse current->group_leader
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
2025-12-07 12:39 ` [PATCH 1/7] android/binder: don't abuse current->group_leader Oleg Nesterov
2025-12-07 12:39 ` [PATCH 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap() Oleg Nesterov
@ 2025-12-07 12:39 ` Oleg Nesterov
2025-12-09 19:22 ` Felix Kuehling
2025-12-07 12:39 ` [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks Oleg Nesterov
` (3 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:39 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
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)
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index b1c24c8fa686..df22b54ba346 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1421,7 +1421,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
goto create_evict_fence_fail;
}
- info->pid = get_task_pid(current->group_leader, PIDTYPE_PID);
+ info->pid = get_task_pid(current, PIDTYPE_TGID);
INIT_DELAYED_WORK(&info->restore_userptr_work,
amdgpu_amdkfd_restore_userptr_worker);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index a67285118c37..a0f8ba382b9e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2554,7 +2554,7 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
if (current->group_leader->mm != current->mm)
return;
- vm->task_info->tgid = current->group_leader->pid;
+ vm->task_info->tgid = current->tgid;
get_task_comm(vm->task_info->process_name, current->group_leader);
}
--
2.52.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
` (2 preceding siblings ...)
2025-12-07 12:39 ` [PATCH 3/7] drm/amdgpu: don't abuse current->group_leader Oleg Nesterov
@ 2025-12-07 12:39 ` Oleg Nesterov
2025-12-08 8:28 ` Christian König
2025-12-09 19:23 ` Felix Kuehling
2025-12-07 12:39 ` [PATCH 5/7] drm/pan*: don't abuse current->group_leader Oleg Nesterov
` (2 subsequent siblings)
6 siblings, 2 replies; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:39 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
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>
---
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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/7] drm/pan*: don't abuse current->group_leader
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
` (3 preceding siblings ...)
2025-12-07 12:39 ` [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks Oleg Nesterov
@ 2025-12-07 12:39 ` Oleg Nesterov
2025-12-08 8:23 ` Boris Brezillon
2025-12-10 11:49 ` Steven Price
2025-12-07 12:40 ` [PATCH 6/7] RDMA/umem: " Oleg Nesterov
2025-12-07 12:40 ` [PATCH 7/7] netclassid: use thread_group_leader(p) in update_classid_task() Oleg Nesterov
6 siblings, 2 replies; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:39 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
Cleanup and preparation to simplify the next changes.
Use current->tgid instead of current->group_leader->pid.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
drivers/gpu/drm/panthor/panthor_gem.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
index 8041b65c6609..1ff1f2c8b726 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
@@ -17,7 +17,7 @@
static void panfrost_gem_debugfs_bo_add(struct panfrost_device *pfdev,
struct panfrost_gem_object *bo)
{
- bo->debugfs.creator.tgid = current->group_leader->pid;
+ bo->debugfs.creator.tgid = current->tgid;
get_task_comm(bo->debugfs.creator.process_name, current->group_leader);
mutex_lock(&pfdev->debugfs.gems_lock);
diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c
index fbde78db270a..29cc57efc4b9 100644
--- a/drivers/gpu/drm/panthor/panthor_gem.c
+++ b/drivers/gpu/drm/panthor/panthor_gem.c
@@ -27,7 +27,7 @@ static void panthor_gem_debugfs_bo_add(struct panthor_gem_object *bo)
struct panthor_device *ptdev = container_of(bo->base.base.dev,
struct panthor_device, base);
- bo->debugfs.creator.tgid = current->group_leader->pid;
+ bo->debugfs.creator.tgid = current->tgid;
get_task_comm(bo->debugfs.creator.process_name, current->group_leader);
mutex_lock(&ptdev->gems.lock);
--
2.52.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 6/7] RDMA/umem: don't abuse current->group_leader
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
` (4 preceding siblings ...)
2025-12-07 12:39 ` [PATCH 5/7] drm/pan*: don't abuse current->group_leader Oleg Nesterov
@ 2025-12-07 12:40 ` Oleg Nesterov
2025-12-21 8:03 ` Leon Romanovsky
2025-12-07 12:40 ` [PATCH 7/7] netclassid: use thread_group_leader(p) in update_classid_task() Oleg Nesterov
6 siblings, 1 reply; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:40 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
Cleanup and preparation to simplify the next changes.
Use current->tgid instead of current->group_leader->pid.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
drivers/infiniband/core/umem_odp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c
index 572a91a62a7b..32267258a19c 100644
--- a/drivers/infiniband/core/umem_odp.c
+++ b/drivers/infiniband/core/umem_odp.c
@@ -149,7 +149,7 @@ struct ib_umem_odp *ib_umem_odp_alloc_implicit(struct ib_device *device,
umem->owning_mm = current->mm;
umem_odp->page_shift = PAGE_SHIFT;
- umem_odp->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
+ umem_odp->tgid = get_task_pid(current, PIDTYPE_TGID);
ib_init_umem_implicit_odp(umem_odp);
return umem_odp;
}
@@ -258,7 +258,7 @@ struct ib_umem_odp *ib_umem_odp_get(struct ib_device *device,
umem_odp->page_shift = HPAGE_SHIFT;
#endif
- umem_odp->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
+ umem_odp->tgid = get_task_pid(current, PIDTYPE_TGID);
ret = ib_init_umem_odp(umem_odp, ops);
if (ret)
goto err_put_pid;
--
2.52.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 7/7] netclassid: use thread_group_leader(p) in update_classid_task()
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
` (5 preceding siblings ...)
2025-12-07 12:40 ` [PATCH 6/7] RDMA/umem: " Oleg Nesterov
@ 2025-12-07 12:40 ` Oleg Nesterov
6 siblings, 0 replies; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-07 12:40 UTC (permalink / raw)
To: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
Cleanup and preparation to simplify the next changes.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
net/core/netclassid_cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
index dff66d8fb325..db9a5354f9de 100644
--- a/net/core/netclassid_cgroup.c
+++ b/net/core/netclassid_cgroup.c
@@ -93,7 +93,7 @@ static void update_classid_task(struct task_struct *p, u32 classid)
/* Only update the leader task, when many threads in this task,
* so it can avoid the useless traversal.
*/
- if (p != p->group_leader)
+ if (!thread_group_leader(p))
return;
do {
--
2.52.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 5/7] drm/pan*: don't abuse current->group_leader
2025-12-07 12:39 ` [PATCH 5/7] drm/pan*: don't abuse current->group_leader Oleg Nesterov
@ 2025-12-08 8:23 ` Boris Brezillon
2025-12-10 11:49 ` Steven Price
1 sibling, 0 replies; 17+ messages in thread
From: Boris Brezillon @ 2025-12-08 8:23 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Rob Herring,
Steven Price, Adrián Larumbe, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Liviu Dudau, Jason Gunthorpe,
Leon Romanovsky, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
On Sun, 7 Dec 2025 13:39:53 +0100
Oleg Nesterov <oleg@redhat.com> wrote:
> Cleanup and preparation to simplify the next changes.
>
> Use current->tgid instead of current->group_leader->pid.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
> drivers/gpu/drm/panthor/panthor_gem.c | 2 +-
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
> index 8041b65c6609..1ff1f2c8b726 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
> @@ -17,7 +17,7 @@
> static void panfrost_gem_debugfs_bo_add(struct panfrost_device *pfdev,
> struct panfrost_gem_object *bo)
> {
> - bo->debugfs.creator.tgid = current->group_leader->pid;
> + bo->debugfs.creator.tgid = current->tgid;
> get_task_comm(bo->debugfs.creator.process_name, current->group_leader);
>
> mutex_lock(&pfdev->debugfs.gems_lock);
> diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c
> index fbde78db270a..29cc57efc4b9 100644
> --- a/drivers/gpu/drm/panthor/panthor_gem.c
> +++ b/drivers/gpu/drm/panthor/panthor_gem.c
> @@ -27,7 +27,7 @@ static void panthor_gem_debugfs_bo_add(struct panthor_gem_object *bo)
> struct panthor_device *ptdev = container_of(bo->base.base.dev,
> struct panthor_device, base);
>
> - bo->debugfs.creator.tgid = current->group_leader->pid;
> + bo->debugfs.creator.tgid = current->tgid;
> get_task_comm(bo->debugfs.creator.process_name, current->group_leader);
>
> mutex_lock(&ptdev->gems.lock);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks
2025-12-07 12:39 ` [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks Oleg Nesterov
@ 2025-12-08 8:28 ` Christian König
2025-12-08 10:05 ` Oleg Nesterov
2025-12-09 19:23 ` Felix Kuehling
1 sibling, 1 reply; 17+ messages in thread
From: Christian König @ 2025-12-08 8:28 UTC (permalink / raw)
To: Oleg Nesterov, Todd Kjos, Martijn Coenen, Joel Fernandes,
Christian Brauner, Carlos Llamas, Suren Baghdasaryan,
Felix Kuehling, Alex Deucher, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
On 12/7/25 13:39, Oleg Nesterov wrote:
> 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().
Just for my understanding: That is because CLONE_THREAD can only be specified together with CLONE_SIGHAND and CLONE_VM, correct?
>
> I don't think that drm/amd tries to detect/nack this case.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Seems to make sense of hand.
Reviewed-by: Christian König <christian.koenig@amd.com>
Should we pick that one up or do you want to merge it upstream somehow?
Regards,
Christian.
> ---
> 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);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks
2025-12-08 8:28 ` Christian König
@ 2025-12-08 10:05 ` Oleg Nesterov
0 siblings, 0 replies; 17+ messages in thread
From: Oleg Nesterov @ 2025-12-08 10:05 UTC (permalink / raw)
To: Christian König
Cc: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
David Airlie, Simona Vetter, Boris Brezillon, Rob Herring,
Steven Price, Adrián Larumbe, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Liviu Dudau, Jason Gunthorpe,
Leon Romanovsky, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
On 12/08, Christian König wrote:
>
> On 12/7/25 13:39, Oleg Nesterov wrote:
> > 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().
>
> Just for my understanding: That is because CLONE_THREAD can only be
> specified together with CLONE_SIGHAND and CLONE_VM, correct?
Yes, copy copy_process() does
if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND))
return ERR_PTR(-EINVAL);
if ((clone_flags & CLONE_SIGHAND) && !(clone_flags & CLONE_VM))
return ERR_PTR(-EINVAL);
...
if (clone_flags & CLONE_THREAD) {
p->group_leader = current->group_leader;
p->tgid = current->tgid;
} else {
p->group_leader = p;
p->tgid = p->pid;
}
> Reviewed-by: Christian König <christian.koenig@amd.com>
Thanks!
> Should we pick that one up or do you want to merge it upstream somehow?
If you don't object, I would like to route this series via -mm tree.
See 0/7, I am going to send more (simple) tree-wide changes which depend
on this series.
Oleg.
> Regards,
> Christian.
>
> > ---
> > 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);
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/7] drm/amdgpu: don't abuse current->group_leader
2025-12-07 12:39 ` [PATCH 3/7] drm/amdgpu: don't abuse current->group_leader Oleg Nesterov
@ 2025-12-09 19:22 ` Felix Kuehling
0 siblings, 0 replies; 17+ messages in thread
From: Felix Kuehling @ 2025-12-09 19:22 UTC (permalink / raw)
To: Oleg Nesterov, Todd Kjos, Martijn Coenen, Joel Fernandes,
Christian Brauner, Carlos Llamas, Suren Baghdasaryan,
Alex Deucher, Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
On 2025-12-07 07:39, Oleg Nesterov wrote:
> 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)
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> index b1c24c8fa686..df22b54ba346 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> @@ -1421,7 +1421,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
> goto create_evict_fence_fail;
> }
>
> - info->pid = get_task_pid(current->group_leader, PIDTYPE_PID);
> + info->pid = get_task_pid(current, PIDTYPE_TGID);
> INIT_DELAYED_WORK(&info->restore_userptr_work,
> amdgpu_amdkfd_restore_userptr_worker);
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index a67285118c37..a0f8ba382b9e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2554,7 +2554,7 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
> if (current->group_leader->mm != current->mm)
> return;
>
> - vm->task_info->tgid = current->group_leader->pid;
> + vm->task_info->tgid = current->tgid;
> get_task_comm(vm->task_info->process_name, current->group_leader);
> }
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks
2025-12-07 12:39 ` [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks Oleg Nesterov
2025-12-08 8:28 ` Christian König
@ 2025-12-09 19:23 ` Felix Kuehling
1 sibling, 0 replies; 17+ messages in thread
From: Felix Kuehling @ 2025-12-09 19:23 UTC (permalink / raw)
To: Oleg Nesterov, Todd Kjos, Martijn Coenen, Joel Fernandes,
Christian Brauner, Carlos Llamas, Suren Baghdasaryan,
Alex Deucher, Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
On 2025-12-07 07:39, Oleg Nesterov wrote:
> 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>
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);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 5/7] drm/pan*: don't abuse current->group_leader
2025-12-07 12:39 ` [PATCH 5/7] drm/pan*: don't abuse current->group_leader Oleg Nesterov
2025-12-08 8:23 ` Boris Brezillon
@ 2025-12-10 11:49 ` Steven Price
1 sibling, 0 replies; 17+ messages in thread
From: Steven Price @ 2025-12-10 11:49 UTC (permalink / raw)
To: Oleg Nesterov, Todd Kjos, Martijn Coenen, Joel Fernandes,
Christian Brauner, Carlos Llamas, Suren Baghdasaryan,
Felix Kuehling, Alex Deucher, Christian König, David Airlie,
Simona Vetter, Boris Brezillon, Rob Herring, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
On 07/12/2025 12:39, Oleg Nesterov wrote:
> Cleanup and preparation to simplify the next changes.
>
> Use current->tgid instead of current->group_leader->pid.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Steven Price <steven.price@arm.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
> drivers/gpu/drm/panthor/panthor_gem.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
> index 8041b65c6609..1ff1f2c8b726 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
> @@ -17,7 +17,7 @@
> static void panfrost_gem_debugfs_bo_add(struct panfrost_device *pfdev,
> struct panfrost_gem_object *bo)
> {
> - bo->debugfs.creator.tgid = current->group_leader->pid;
> + bo->debugfs.creator.tgid = current->tgid;
> get_task_comm(bo->debugfs.creator.process_name, current->group_leader);
>
> mutex_lock(&pfdev->debugfs.gems_lock);
> diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c
> index fbde78db270a..29cc57efc4b9 100644
> --- a/drivers/gpu/drm/panthor/panthor_gem.c
> +++ b/drivers/gpu/drm/panthor/panthor_gem.c
> @@ -27,7 +27,7 @@ static void panthor_gem_debugfs_bo_add(struct panthor_gem_object *bo)
> struct panthor_device *ptdev = container_of(bo->base.base.dev,
> struct panthor_device, base);
>
> - bo->debugfs.creator.tgid = current->group_leader->pid;
> + bo->debugfs.creator.tgid = current->tgid;
> get_task_comm(bo->debugfs.creator.process_name, current->group_leader);
>
> mutex_lock(&ptdev->gems.lock);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap()
2025-12-07 12:39 ` [PATCH 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap() Oleg Nesterov
@ 2025-12-18 11:05 ` Alice Ryhl
0 siblings, 0 replies; 17+ messages in thread
From: Alice Ryhl @ 2025-12-18 11:05 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-kernel, amd-gfx, dri-devel,
linux-rdma, netdev
On Sun, Dec 7, 2025 at 1:40 PM Oleg Nesterov <oleg@redhat.com> wrote:
>
> With or without this change the checked condition can be falsely true
> if proc->tsk execs, but this is fine: binder_alloc_mmap_handler() checks
> vma->vm_mm == alloc->mm.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/7] android/binder: don't abuse current->group_leader
2025-12-07 12:39 ` [PATCH 1/7] android/binder: don't abuse current->group_leader Oleg Nesterov
@ 2025-12-18 11:06 ` Alice Ryhl
0 siblings, 0 replies; 17+ messages in thread
From: Alice Ryhl @ 2025-12-18 11:06 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-kernel, amd-gfx, dri-devel,
linux-rdma, netdev
On Sun, Dec 7, 2025 at 1:39 PM Oleg Nesterov <oleg@redhat.com> wrote:
>
> Cleanup and preparation to simplify the next changes.
>
> - Use current->tgid instead of current->group_leader->pid
>
> - Use the value returned by get_task_struct() to initialize proc->tsk
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 6/7] RDMA/umem: don't abuse current->group_leader
2025-12-07 12:40 ` [PATCH 6/7] RDMA/umem: " Oleg Nesterov
@ 2025-12-21 8:03 ` Leon Romanovsky
0 siblings, 0 replies; 17+ messages in thread
From: Leon Romanovsky @ 2025-12-21 8:03 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
Carlos Llamas, Suren Baghdasaryan, Felix Kuehling, Alex Deucher,
Christian König, David Airlie, Simona Vetter,
Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
Jason Gunthorpe, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, linux-kernel, amd-gfx, dri-devel, linux-rdma, netdev
On Sun, Dec 07, 2025 at 01:40:05PM +0100, Oleg Nesterov wrote:
> Cleanup and preparation to simplify the next changes.
>
> Use current->tgid instead of current->group_leader->pid.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
> drivers/infiniband/core/umem_odp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Thanks,
Acked-by: Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2025-12-21 8:03 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-07 12:38 [PATCH 0/7] don't abuse task_struct.group_leader Oleg Nesterov
2025-12-07 12:39 ` [PATCH 1/7] android/binder: don't abuse current->group_leader Oleg Nesterov
2025-12-18 11:06 ` Alice Ryhl
2025-12-07 12:39 ` [PATCH 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap() Oleg Nesterov
2025-12-18 11:05 ` Alice Ryhl
2025-12-07 12:39 ` [PATCH 3/7] drm/amdgpu: don't abuse current->group_leader Oleg Nesterov
2025-12-09 19:22 ` Felix Kuehling
2025-12-07 12:39 ` [PATCH 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks Oleg Nesterov
2025-12-08 8:28 ` Christian König
2025-12-08 10:05 ` Oleg Nesterov
2025-12-09 19:23 ` Felix Kuehling
2025-12-07 12:39 ` [PATCH 5/7] drm/pan*: don't abuse current->group_leader Oleg Nesterov
2025-12-08 8:23 ` Boris Brezillon
2025-12-10 11:49 ` Steven Price
2025-12-07 12:40 ` [PATCH 6/7] RDMA/umem: " Oleg Nesterov
2025-12-21 8:03 ` Leon Romanovsky
2025-12-07 12:40 ` [PATCH 7/7] netclassid: use thread_group_leader(p) in update_classid_task() Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).