Commit f7a6cb7b authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford

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: 33b9b3ee ("IB: Add userspace support for resizing CQs")
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 5fff41e1
...@@ -1153,7 +1153,7 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file, ...@@ -1153,7 +1153,7 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file,
int out_len) int out_len)
{ {
struct ib_uverbs_resize_cq cmd; struct ib_uverbs_resize_cq cmd;
struct ib_uverbs_resize_cq_resp resp; struct ib_uverbs_resize_cq_resp resp = {};
struct ib_udata udata; struct ib_udata udata;
struct ib_cq *cq; struct ib_cq *cq;
int ret = -EINVAL; int ret = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment