[ofw] [PATCH] mlx4u.dll: initialize QP pointer before use

Sean Hefty sean.hefty at intel.com
Fri Jan 16 16:42:42 PST 2009


We need to initialize the qp pointer to NULL to avoid accessing some random
memory location when polling for completions.  Without this, calls to
mlx4_poll_cq_array() can crash in mlx4_poll_one().

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
A bonus patch!  To make it easier, I can commit this when committing the
rdma cm support.

Index: hw/mlx4/user/hca/cq.c
===================================================================
--- hw/mlx4/user/hca/cq.c	(revision 1794)
+++ hw/mlx4/user/hca/cq.c	(working copy)
@@ -348,7 +348,7 @@
 			const int num_entries, uvp_wc_t* const wc)
 {
 	struct mlx4_cq *cq = to_mcq((struct ibv_cq *)/*Ptr64ToPtr(*/ h_cq /*)*/);
-	struct mlx4_qp *qp;
+	struct mlx4_qp *qp = NULL;
 	int ne;
 	int err = CQ_EMPTY;
 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlx-qp-init.patch
Type: application/octet-stream
Size: 411 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090116/5bc70dcf/attachment.obj>


More information about the ofw mailing list