Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

RDMA/uverbs: Track dmabuf memory regions

The dmabuf memory registrations are missing the restrack handling and
hence do not appear in rdma tool.

Fixes: bfe0cc6eb249 ("RDMA/uverbs: Add uverbs command for dma-buf based MR registration")
Link: https://lore.kernel.org/r/20210812135607.6228-1-galpress@amazon.com
Signed-off-by: Gal Pressman <galpress@amazon.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

authored by

Gal Pressman and committed by
Jason Gunthorpe
f6018cc4 da78fe5f

+3
+3
drivers/infiniband/core/uverbs_std_types_mr.c
··· 249 249 mr->uobject = uobj; 250 250 atomic_inc(&pd->usecnt); 251 251 252 + rdma_restrack_new(&mr->res, RDMA_RESTRACK_MR); 253 + rdma_restrack_set_name(&mr->res, NULL); 254 + rdma_restrack_add(&mr->res); 252 255 uobj->object = mr; 253 256 254 257 uverbs_finalize_uobj_create(attrs, UVERBS_ATTR_REG_DMABUF_MR_HANDLE);