lkml.org 
[lkml]   [2025]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 6/7] RDMA/umem: don't abuse current->group_leader
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

\
 
 \ /
  Last update: 2025-12-07 13:43    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog