diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-20 23:47:11 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-22 17:02:59 +0200 |
commit | 321d7863acf7b1cf921ac18cd5ad5483b3cbb7ec (patch) | |
tree | 3502d3015b6ba2949f9ba15c509c8a5281ac65f6 /drivers/infiniband/core/uverbs_ioctl.c | |
parent | Merge branch 'icrc-counter' into rdma.git for-next (diff) | |
download | linux-321d7863acf7b1cf921ac18cd5ad5483b3cbb7ec.tar.xz linux-321d7863acf7b1cf921ac18cd5ad5483b3cbb7ec.zip |
IB/uverbs: Delete type and id from uverbs_obj_attr
In this context the uobject is not allowed to be NULL, so type is the same
as uobject->type, and at least for IDR, id is the same as uobject->id.
FD objects should never handle the FD number outside the uAPI boundary
code.
Suggested-by: Guy Levi <guyle@mellanox.com>
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/core/uverbs_ioctl.c b/drivers/infiniband/core/uverbs_ioctl.c index 20be6835291e..03065bad8dae 100644 --- a/drivers/infiniband/core/uverbs_ioctl.c +++ b/drivers/infiniband/core/uverbs_ioctl.c @@ -152,14 +152,12 @@ static int uverbs_process_attr(struct ib_device *ibdev, object = uverbs_get_object(ibdev, spec->obj.obj_type); if (!object) return -EINVAL; - o_attr->type = object->type_attrs; - o_attr->id = (int)uattr->data; o_attr->uobject = uverbs_get_uobject_from_context( - o_attr->type, + object->type_attrs, ucontext, spec->obj.access, - o_attr->id); + (int)uattr->data); if (IS_ERR(o_attr->uobject)) return PTR_ERR(o_attr->uobject); |