Skip to content

Commit 0f9826f

Browse files
committed
RDMA/odp: Fix leaking the tgid for implicit ODP
The tgid used to be part of ib_umem_free_notifier(), when it was reworked it got moved to release, but it should have been unconditional as all umem alloc paths get the tgid. As is, creating an implicit ODP will leak the tgid reference. Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Fixes: f25a546 ("RDMA/odp: Use mmu_interval_notifier_insert()") Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 2c523b3 commit 0f9826f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/core/umem_odp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ void ib_umem_odp_release(struct ib_umem_odp *umem_odp)
275275
mmu_interval_notifier_remove(&umem_odp->notifier);
276276
kvfree(umem_odp->dma_list);
277277
kvfree(umem_odp->page_list);
278-
put_pid(umem_odp->tgid);
279278
}
279+
put_pid(umem_odp->tgid);
280280
kfree(umem_odp);
281281
}
282282
EXPORT_SYMBOL(ib_umem_odp_release);

0 commit comments

Comments
 (0)