[ofa-general] [PATCH] libmlx4: prevent seg fault when sending big messages as inline

Dotan Barak dotanb at dev.mellanox.co.il
Sun Jan 13 07:43:23 PST 2008


Fix the type of the variable that hold the number of bytes sent 
as inline message so far.
Without the patch, If the user will try to use very big messages (total > 2^31) 
there will be a seg fault.

Signed-off-by: Dotan Barak <dotanb at dev.mellanox.co.il>

---

diff --git a/src/qp.c b/src/qp.c
index 8b4adaa..abac597 100644
--- a/src/qp.c
+++ b/src/qp.c
@@ -177,7 +177,7 @@ int mlx4_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 	struct mlx4_wqe_ctrl_seg *ctrl;
 	int ind;
 	int nreq;
-	int inl = 0;
+	unsigned int inl = 0;
 	int ret = 0;
 	int size;
 	int i;



More information about the general mailing list