aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 8f67fe2e91e6..5b53ca5a2284 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -1384,6 +1384,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1384 1384
1385 if (ibpd->uobject) { 1385 if (ibpd->uobject) {
1386 uresp.mmap_sq_db_index = nesqp->mmap_sq_db_index; 1386 uresp.mmap_sq_db_index = nesqp->mmap_sq_db_index;
1387 uresp.mmap_rq_db_index = 0;
1387 uresp.actual_sq_size = sq_size; 1388 uresp.actual_sq_size = sq_size;
1388 uresp.actual_rq_size = rq_size; 1389 uresp.actual_rq_size = rq_size;
1389 uresp.qp_id = nesqp->hwqp.qp_id; 1390 uresp.qp_id = nesqp->hwqp.qp_id;
@@ -1767,7 +1768,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1767 resp.cq_id = nescq->hw_cq.cq_number; 1768 resp.cq_id = nescq->hw_cq.cq_number;
1768 resp.cq_size = nescq->hw_cq.cq_size; 1769 resp.cq_size = nescq->hw_cq.cq_size;
1769 resp.mmap_db_index = 0; 1770 resp.mmap_db_index = 0;
1770 if (ib_copy_to_udata(udata, &resp, sizeof resp)) { 1771 if (ib_copy_to_udata(udata, &resp, sizeof resp - sizeof resp.reserved)) {
1771 nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num); 1772 nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
1772 kfree(nescq); 1773 kfree(nescq);
1773 return ERR_PTR(-EFAULT); 1774 return ERR_PTR(-EFAULT);