]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/umem: don't abuse current->group_leader
authorOleg Nesterov <oleg@redhat.com>
Sun, 25 Jan 2026 16:07:52 +0000 (17:07 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 3 Feb 2026 16:21:25 +0000 (08:21 -0800)
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>
drivers/infiniband/core/umem_odp.c

index 572a91a62a7beafcaa15aa43355500c3fb9d5b63..32267258a19cbcdf2cdef6808d359059570a51b5 100644 (file)
@@ -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;