[ofw] [PATCH] mlx4u.dll: initialize QP pointer before use
Leonid Keller
leonid at mellanox.co.il
Sun Jan 18 00:59:14 PST 2009
Good catch !
You may commit it.
> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Saturday, January 17, 2009 2:43 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] mlx4u.dll: initialize QP pointer before use
>
> 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;
>
>
>
More information about the ofw
mailing list