diff mbox

[for-next,06/15] IB/usnic: Initialize all of the data returned to userspace

Message ID 1387571206-8043-7-git-send-email-umalhi@cisco.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Upinder Malhi (umalhi) Dec. 20, 2013, 8:26 p.m. UTC
The reserved fields in usnic_ib_create_qp_resp are returned
to userspace uninitialized.  Set these to 0.

Signed-off-by: Upinder Malhi <umalhi@cisco.com>
---
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index e19ca90..9f0945a 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -49,6 +49,8 @@  static int usnic_ib_fill_create_qp_resp(struct usnic_ib_qp_grp *qp_grp,
 	struct usnic_vnic_res_chunk *chunk;
 	int i, err;
 
+	memset(&resp, 0, sizeof(resp));
+
 	us_ibdev = qp_grp->vf->pf;
 	pdev = usnic_vnic_get_pdev(qp_grp->vf->vnic);
 	if (!pdev) {