aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c3
-rw-r--r--include/rdma/ib_user_verbs.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 8b6df7cec0bf..deae43f31e79 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -879,11 +879,10 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file,
879 if (ret) 879 if (ret)
880 goto out; 880 goto out;
881 881
882 memset(&resp, 0, sizeof resp);
883 resp.cqe = cq->cqe; 882 resp.cqe = cq->cqe;
884 883
885 if (copy_to_user((void __user *) (unsigned long) cmd.response, 884 if (copy_to_user((void __user *) (unsigned long) cmd.response,
886 &resp, sizeof resp)) 885 &resp, sizeof resp.cqe))
887 ret = -EFAULT; 886 ret = -EFAULT;
888 887
889out: 888out:
diff --git a/include/rdma/ib_user_verbs.h b/include/rdma/ib_user_verbs.h
index 7b5372010f4b..db1b814b62cc 100644
--- a/include/rdma/ib_user_verbs.h
+++ b/include/rdma/ib_user_verbs.h
@@ -275,6 +275,8 @@ struct ib_uverbs_resize_cq {
275 275
276struct ib_uverbs_resize_cq_resp { 276struct ib_uverbs_resize_cq_resp {
277 __u32 cqe; 277 __u32 cqe;
278 __u32 reserved;
279 __u64 driver_data[0];
278}; 280};
279 281
280struct ib_uverbs_poll_cq { 282struct ib_uverbs_poll_cq {