diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2018-11-28 13:16:44 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-12-03 14:58:25 -0500 |
commit | 12d23a91983348bafcf646d5520de320a6a6f8e3 (patch) | |
tree | b579a0d272bc40d58a6f8a3047c3051cd876b290 /drivers/infiniband/core/uverbs_cmd.c | |
parent | 606152107bbdbc0e21f25e0d15ef2787a4ab90fd (diff) |
RDMA/uverbs: Annotate alloc/deallloc paths with context tracking
Add restrack annotations to track allocations of ucontexts.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 4dab9f7e1f94..b70749542471 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -259,6 +259,9 @@ static int ib_uverbs_get_context(struct uverbs_attr_bundle *attrs) fd_install(resp.async_fd, filp); + ucontext->res.type = RDMA_RESTRACK_CTX; + rdma_restrack_add(&ucontext->res); + /* * Make sure that ib_uverbs_get_ucontext() sees the pointer update * only after all writes to setup the ucontext have completed |