summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_ioctl.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2018-05-09 17:40:44 +0200
committerWolfram Sang <wsa@the-dreams.de>2018-05-09 17:40:44 +0200
commit4c0330208f6bfe5285bae239fdb2a7ec1ce1f78d (patch)
tree257c871b0be4c7eafa0e6911ab596bfb0f51a104 /drivers/infiniband/core/uverbs_ioctl.c
parent7781edaed63e9396fc913e0899cb197562e6f1a0 (diff)
parent76aa3de7095f15af7300012cb29ea8ab93eec348 (diff)
downloadtalos-op-linux-4c0330208f6bfe5285bae239fdb2a7ec1ce1f78d.tar.gz
talos-op-linux-4c0330208f6bfe5285bae239fdb2a7ec1ce1f78d.zip
Merge tag 'at24-4.17-rc5-fixes-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current
Single bug-fix for a regression introduced during the 4.17 merge window.
Diffstat (limited to 'drivers/infiniband/core/uverbs_ioctl.c')
-rw-r--r--drivers/infiniband/core/uverbs_ioctl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_ioctl.c b/drivers/infiniband/core/uverbs_ioctl.c
index 8c93970dc8f1..8d32c4ae368c 100644
--- a/drivers/infiniband/core/uverbs_ioctl.c
+++ b/drivers/infiniband/core/uverbs_ioctl.c
@@ -234,6 +234,15 @@ static int uverbs_validate_kernel_mandatory(const struct uverbs_method_spec *met
return -EINVAL;
}
+ for (; i < method_spec->num_buckets; i++) {
+ struct uverbs_attr_spec_hash *attr_spec_bucket =
+ method_spec->attr_buckets[i];
+
+ if (!bitmap_empty(attr_spec_bucket->mandatory_attrs_bitmask,
+ attr_spec_bucket->num_attrs))
+ return -EINVAL;
+ }
+
return 0;
}
OpenPOWER on IntegriCloud