[openib-general] hack around IWCM double-close problem
Pete Wyckoff
pw at osc.edu
Fri Aug 4 13:14:23 PDT 2006
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 <pw at osc.edu>
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);
}
More information about the general
mailing list