diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2017-08-01 02:41:35 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-04 14:24:05 -0400 |
commit | f7a6cb7b38c6845b26aaa8bbdf519ff6e3090831 (patch) | |
tree | 4d99e9f004c4b655dc0b06b9bc175edba6cc3d4d | |
parent | 5fff41e1f89d93feef9833c49a415dc337af5a99 (diff) |
RDMA/uverbs: Prevent leak of reserved field
initialize to zero the response structure to prevent
the leakage of "resp.reserved" field.
drivers/infiniband/core/uverbs_cmd.c:1178 ib_uverbs_resize_cq() warn:
check that 'resp.reserved' doesn't leak information
Fixes: 33b9b3ee9709 ("IB: Add userspace support for resizing CQs")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 2c98533a0203..c551d2b275fd 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
@@ -1153,7 +1153,7 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file, | |||
1153 | int out_len) | 1153 | int out_len) |
1154 | { | 1154 | { |
1155 | struct ib_uverbs_resize_cq cmd; | 1155 | struct ib_uverbs_resize_cq cmd; |
1156 | struct ib_uverbs_resize_cq_resp resp; | 1156 | struct ib_uverbs_resize_cq_resp resp = {}; |
1157 | struct ib_udata udata; | 1157 | struct ib_udata udata; |
1158 | struct ib_cq *cq; | 1158 | struct ib_cq *cq; |
1159 | int ret = -EINVAL; | 1159 | int ret = -EINVAL; |