aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_cmd.c
diff options
context:
space:
mode:
authorShamir Rabinovitch <shamir.rabinovitch@oracle.com>2019-04-30 17:23:21 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-05-03 10:09:25 -0300
commit4f33dd41b24c1e3494a6ea6c7839ea068343f809 (patch)
treec13b61e69d70001b3c7232eed87f0db46ff7bf55 /drivers/infiniband/core/uverbs_cmd.c
parentRDMA/uverbs: Initialize udata struct on destroy flows (diff)
downloadlinux-dev-4f33dd41b24c1e3494a6ea6c7839ea068343f809.tar.xz
linux-dev-4f33dd41b24c1e3494a6ea6c7839ea068343f809.zip
RDMA/uverbs: Initialize uverbs_attr_bundle ucontext in ib_uverbs_get_context
ib_uverbs_get_context does not have a uobject so it does not call the rdma_lookup_get_uobject which is used to set up the uverbs_attr_bundle ucontext. For ib_uverbs_get_context we need to set up this manually before we send the uverbs_attr_bundle down to the driver layer. This completes the change that was done in commit 70f06b26f07e ("IB: ucontext should be set properly for all cmd & ioctl paths") Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 04d08135b374..76ac113d1da5 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -230,6 +230,8 @@ static int ib_uverbs_get_context(struct uverbs_attr_bundle *attrs)
goto err_alloc;
}
+ attrs->context = ucontext;
+
ucontext->res.type = RDMA_RESTRACK_CTX;
ucontext->device = ib_dev;
ucontext->cg_obj = cg_obj;