aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_ioctl.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-07-25 21:40:18 -0600
committerJason Gunthorpe <jgg@mellanox.com>2018-08-01 14:55:48 -0600
commite83f0ecdc40f2c3d63ff0e7f17462a29d12684a2 (patch)
tree3d8df27cf0e51e1353f49582cde9235c29603856 /drivers/infiniband/core/uverbs_ioctl.c
parentIB/uverbs: Do not pass struct ib_device to the write based methods (diff)
downloadlinux-dev-e83f0ecdc40f2c3d63ff0e7f17462a29d12684a2.tar.xz
linux-dev-e83f0ecdc40f2c3d63ff0e7f17462a29d12684a2.zip
IB/uverbs: Do not pass struct ib_device to the ioctl methods
This does the same as the patch before, except for ioctl. The rules are the same, but for the ioctl methods the core code handles setting up the uobject. - Retrieve the ib_dev from the uobject->context->device. This is safe under ioctl as the core has already done rdma_alloc_begin_uobject and so CREATE calls are entirely protected by the rwsem. - Retrieve the ib_dev from uobject->object - Call ib_uverbs_get_ucontext() Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_ioctl.c')
-rw-r--r--drivers/infiniband/core/uverbs_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_ioctl.c b/drivers/infiniband/core/uverbs_ioctl.c
index f3776f909ca5..f0655a84f9d9 100644
--- a/drivers/infiniband/core/uverbs_ioctl.c
+++ b/drivers/infiniband/core/uverbs_ioctl.c
@@ -354,7 +354,7 @@ static int uverbs_handle_method(struct ib_uverbs_attr __user *uattr_ptr,
goto cleanup;
}
- ret = method_spec->handler(ibdev, ufile, attr_bundle);
+ ret = method_spec->handler(ufile, attr_bundle);
if (destroy_attr) {
uobj_put_destroy(destroy_attr->uobject);