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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 examples/rping.c | 1 +
 1 file changed, 1 insertion(+)

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;
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux