This race can occur in practice and results in a system crash.  I was able to
hit it with other changes to improve connection establishment times.

I'm testing against the patch below which seems to fix the crash.  I'll submit
formal patches after more extensive testing, but wanted to post this for early
review.

Signed-off-by: Sean Hefty <[email protected]>
---

diff --git a/trunk/core/al/kernel/al_cm_cep.c b/trunk/core/al/kernel/al_cm_cep.c
index fbdfd56..c8b4c20 100644
--- a/trunk/core/al/kernel/al_cm_cep.c
+++ b/trunk/core/al/kernel/al_cm_cep.c
@@ -938,7 +938,6 @@ __process_rej(
                }

                /* Fall through */
-       case CEP_STATE_REQ_RCVD:
        case CEP_STATE_REP_RCVD:
        case CEP_STATE_REQ_MRA_SENT:
        case CEP_STATE_REP_MRA_SENT:
@@ -955,6 +954,13 @@ __process_rej(
                p_cep->state = CEP_STATE_IDLE;
                break;

+       case CEP_STATE_REQ_RCVD:
+               __remove_cep( p_cep );
+               p_cep->state = CEP_STATE_IDLE;
+               ib_put_mad( p_mad );
+               AL_EXIT( AL_DBG_CM );
+               return IB_NO_MATCH;
+
        case CEP_STATE_ESTABLISHED:
        case CEP_STATE_LAP_RCVD:
        case CEP_STATE_LAP_SENT:

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to