[ofw] patch: [IBBUS] Handling a situation when __complete_send_mad receives NULL instead of p_mad_wr parameter

Fab Tillier ftillier at microsoft.com
Tue Aug 31 09:52:15 PDT 2010


This seems like totally the wrong place to fix this.  If you look, all the callers to __complete_send_mad ASSERT that p_mad_wr is valid.  Invoking a completion with a work request ID of 0 may be valid for the recipient - if there's no MAD, then no MAD was sent (this is a send completion afterall.)  In this case, a failure to allocate the sent MAD should result in a failure to send.  I'm surprised things didn't blow up before getting this far.

-Fab

From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
Sent: Tuesday, August 31, 2010 6:50 AM
To: ofw at lists.openfabrics.org
Subject: [ofw] patch: [IBBUS] Handling a situation when __complete_send_mad receives NULL instead of p_mad_wr parameter

may occur during Verifier low-mem simulation run. Mlnx - 4990


signed off by:xalex

Index: B:/users/tzachid/projinf9/trunk/core/al/kernel/al_smi.c
===================================================================
--- B:/users/tzachid/projinf9/trunk/core/al/kernel/al_smi.c        (revision 4989)
+++ B:/users/tzachid/projinf9/trunk/core/al/kernel/al_smi.c     (revision 4990)
@@ -893,7 +893,10 @@

                /* Construct a send work completion. */
                cl_memclr( &wc, sizeof( ib_wc_t ) );
-              wc.wr_id             = p_mad_wr->send_wr.wr_id;
+             if (p_mad_wr) {
+                             // Handling the special race where p_mad_wr that comes from spl_qp can be NULL
+                             wc.wr_id             = p_mad_wr->send_wr.wr_id;
+             }
                wc.wc_type       = IB_WC_SEND;
                wc.status             = wc_status;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100831/e0999dcb/attachment.html>


More information about the ofw mailing list