diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-04 01:20:07 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-26 23:27:59 +0100 |
commit | 1c407cb5d70568a57a32a0e6f5aee27c5083ef37 (patch) | |
tree | a679fca000ce1fabe0b1a90dafd6d3f667fa68e9 /drivers/infiniband/sw/rdmavt | |
parent | RDMA: Check attr_mask during modify_qp (diff) | |
download | linux-1c407cb5d70568a57a32a0e6f5aee27c5083ef37.tar.xz linux-1c407cb5d70568a57a32a0e6f5aee27c5083ef37.zip |
RDMA: Check flags during create_cq
Each driver should check that the CQ attrs is supported. Unfortuantely
when flags was added to the CQ attrs the drivers were not updated,
uverbs_ex_cmd_mask was used to block it. This was missed when create CQ
was converted to ioctl, so non-zero flags could have been passed into
drivers.
Check that flags is zero in all drivers that don't use it, remove
IB_USER_VERBS_EX_CMD_CREATE_CQ from uverbs_ex_cmd_mask.
Fixes: 41b2a71fc848 ("IB/uverbs: Move ioctl path of create_cq and destroy_cq to a new file")
Link: https://lore.kernel.org/r/7-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/cq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/cq.c b/drivers/infiniband/sw/rdmavt/cq.c index 19248be14093..20cc0799ac4b 100644 --- a/drivers/infiniband/sw/rdmavt/cq.c +++ b/drivers/infiniband/sw/rdmavt/cq.c @@ -211,7 +211,7 @@ int rvt_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr, int err; if (attr->flags) - return -EINVAL; + return -EOPNOTSUPP; if (entries < 1 || entries > rdi->dparms.props.max_cqe) return -EINVAL; |