diff mbox

[v1,1/1,librdmacm] examples/rping.c: fix unwanted abort during qp creation

Message ID 1462779876-9480-1-git-send-email-bharat@chelsio.com (mailing list archive)
State Accepted
Headers show

Commit Message

Potnuri Bharat Teja May 9, 2016, 7:44 a.m. UTC
Memset rping control block structure to 0 to avoid accessing garbage
values in the upcoming checks in librdmacm causing unwanted abort during
creation of qp.

Fixes: b873915aee7b ("librdmacm/rping: Persistent rping server")

Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
---
 examples/rping.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Steve Wise May 17, 2016, 4:18 p.m. UTC | #1
> 
> Memset rping control block structure to 0 to avoid accessing garbage
> values in the upcoming checks in librdmacm causing unwanted abort during
> creation of qp.
> 
> Fixes: b873915aee7b ("librdmacm/rping: Persistent rping server")
> 
> Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>

Looks good.

Reviewed-by: Steve Wise <swise@opengridcomputing.com>

Sean, does this look good to merge?

Steve.



--
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
Hefty, Sean May 17, 2016, 4:29 p.m. UTC | #2
> Sean, does this look good to merge?

Yes - I have it marked in my inbox, just haven't take time to merge it.  Sorry, I should have responded sooner with at least an update.
--
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
Hefty, Sean May 19, 2016, 10:19 p.m. UTC | #3
Thanks - applied

--
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/examples/rping.c b/examples/rping.c
index a5aa8c5f38d6..a0d10779a8b1 100644
--- a/examples/rping.c
+++ b/examples/rping.c
@@ -759,6 +759,7 @@  static struct rping_cb *clone_cb(struct rping_cb *listening_cb)
 	struct rping_cb *cb = malloc(sizeof *cb);
 	if (!cb)
 		return NULL;
+	memset(cb, 0, sizeof *cb);
 	*cb = *listening_cb;
 	cb->child_cm_id->context = cb;
 	return cb;