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

Hefty, Sean sean.hefty at intel.com
Tue Jan 20 13:57:03 PST 2009


committed in svn 1859

>-----Original Message-----
>From: Leonid Keller [mailto:leonid at mellanox.co.il]
>Sent: Sunday, January 18, 2009 12:59 AM
>To: Hefty, Sean; ofw at lists.openfabrics.org
>Subject: RE: [ofw] [PATCH] mlx4u.dll: initialize QP pointer before use
>
>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