Skip to content

Commit 6fd390e

Browse files
oleg-nesterovakpm00
authored andcommitted
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. Link: https://lkml.kernel.org/r/aXY_2JIhCeGAYC0r@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Leon Romanovsky <leon@kernel.org> Cc: Alice Ryhl <aliceryhl@google.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Christan König <christian.koenig@amd.com> Cc: David S. Miller <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Felix Kuehling <felix.kuehling@amd.com> Cc: Jakub Kicinski <kuba@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>
1 parent 05f8f36 commit 6fd390e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/infiniband/core/umem_odp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ struct ib_umem_odp *ib_umem_odp_alloc_implicit(struct ib_device *device,
149149
umem->owning_mm = current->mm;
150150
umem_odp->page_shift = PAGE_SHIFT;
151151

152-
umem_odp->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
152+
umem_odp->tgid = get_task_pid(current, PIDTYPE_TGID);
153153
ib_init_umem_implicit_odp(umem_odp);
154154
return umem_odp;
155155
}
@@ -258,7 +258,7 @@ struct ib_umem_odp *ib_umem_odp_get(struct ib_device *device,
258258
umem_odp->page_shift = HPAGE_SHIFT;
259259
#endif
260260

261-
umem_odp->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
261+
umem_odp->tgid = get_task_pid(current, PIDTYPE_TGID);
262262
ret = ib_init_umem_odp(umem_odp, ops);
263263
if (ret)
264264
goto err_put_pid;

0 commit comments

Comments
 (0)