path: root/include/rdma/uverbs_types.h
diff options
authorShamir Rabinovitch <shamir.rabinovitch@oracle.com>2019-03-31 19:10:03 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-04-01 14:55:03 -0300
commit70f06b26f07ea42d158b41bba460ce06ffa3510a (patch)
tree6d98d669c6833a862eff9cec72ca0b243c9c489b /include/rdma/uverbs_types.h
parentopa_vnic: Convert vport_idr to XArray (diff)
IB: ucontext should be set properly for all cmd & ioctl paths
the Attempt to use the below commit to initialize the ucontext for the uobject destroy path has shown that the below commit is incomplete. Parts were reverted and the ucontext set up in the uverbs_attr_bundle was moved to rdma_lookup_get_uobject which is called from the uobj_get_XXX macros and rdma_alloc_begin_uobject which is called when uobject is created. Fixes: 3d9dfd060391 ("IB/uverbs: Add ib_ucontext to uverbs_attr_bundle sent from ioctl and cmd flows") Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/rdma/uverbs_types.h')
1 files changed, 4 insertions, 2 deletions
diff --git a/include/rdma/uverbs_types.h b/include/rdma/uverbs_types.h
index 175d761695e1..b68f1b92c25d 100644
--- a/include/rdma/uverbs_types.h
+++ b/include/rdma/uverbs_types.h
@@ -131,11 +131,13 @@ struct uverbs_obj_idr_type {
struct ib_uobject *rdma_lookup_get_uobject(const struct uverbs_api_object *obj,
struct ib_uverbs_file *ufile, s64 id,
- enum rdma_lookup_mode mode);
+ enum rdma_lookup_mode mode,
+ struct uverbs_attr_bundle *attrs);
void rdma_lookup_put_uobject(struct ib_uobject *uobj,
enum rdma_lookup_mode mode);
struct ib_uobject *rdma_alloc_begin_uobject(const struct uverbs_api_object *obj,
- struct ib_uverbs_file *ufile);
+ struct ib_uverbs_file *ufile,
+ struct uverbs_attr_bundle *attrs);
void rdma_alloc_abort_uobject(struct ib_uobject *uobj);
int __must_check rdma_alloc_commit_uobject(struct ib_uobject *uobj);