In some cases using Ammasso devices, a CONNECTION_LOST message may
come from c2_ae_event while something else is in the middle of
c2_destroy_qp.  If that happens, a BUG_ON triggers in
cm_close_handler as the QP goes to IDLE after the first of the two
calls.  Perhaps this is a problem with the Ammasso driver, but this
little hack-around hid it for me.

Signed-off-by: Pete Wyckoff <[EMAIL PROTECTED]>

Index: linux-kernel/infiniband/core/iwcm.c
===================================================================
--- linux-kernel/infiniband/core/iwcm.c (revision 8688)
+++ linux-kernel/infiniband/core/iwcm.c (working copy)
@@ -673,6 +673,12 @@
        case IW_CM_STATE_DESTROYING:
                spin_unlock_irqrestore(&cm_id_priv->lock, flags);
                break;
+       case IW_CM_STATE_IDLE:
+               /* protect against double-close from concurrent c2_destroy_qp
+                * and c2_ae_event CONNECTION_LOST */
+               printk(KERN_INFO "%s: in IDLE state, ignoring\n", __func__);
+               spin_unlock_irqrestore(&cm_id_priv->lock, flags);
+               break;
        default:
                BUG_ON(1);
        }

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to