[openib-general] hack around IWCM double-close problem

Steve Wise swise at opengridcomputing.com
Mon Aug 7 09:46:30 PDT 2006


The BUG_ON is there to catch these problems.  The iwarp driver is never
supposed to post events twice.  I'll look into this, but I think the fix
should be in the amso driver...

Tom, what do you think?


Steve.



On Fri, 2006-08-04 at 16:14 -0400, Pete Wyckoff wrote:
> 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);
>  	}
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 





More information about the general mailing list