diff mbox

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

Message ID 1387298917-7365-7-git-send-email-umalhi@cisco.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Upinder Malhi (umalhi) Dec. 17, 2013, 4:48 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(+)

--
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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) {