iWCM: Do not call provider reject method with irqs disabled.
PATCH 1/1 iWCM: Do not call provider reject method with irqs disabled.
---
drivers/infiniband/core/iwcm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/infiniband/core/iwcm.c +2 -0
@@ -362,7 +362,9 @@ static void destroy_cm_id(struct iw_cm_id *cm_id)* In either case, must tell the provider to reject. */ cm_id_priv->state =IW_CM_STATE_DESTROYING ; +spin_unlock_irqrestore (&cm_id_priv->lock, flags); cm_id->device->iwcm->reject (cm_id,NULL ,0 ); +spin_lock_irqsave (&cm_id_priv->lock, flags);break ;case IW_CM_STATE_CONN_SENT :case IW_CM_STATE_DESTROYING :
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20090928190328.26092.69566.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org
Haven't looked closely... could you provide commentatry on why dropping the lock is safe here? No chance of racing against something else?
Anyway -ENOCHANGELOG
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Roland Dreier
Haven't looked closely... could you provide commentatry on why dropping the lock is safe here? No chance of racing against something else?
Anyway
-ENOCHANGELOG- R.
Sorry Roland. I'll add a changelog and repost.
The reason its ok to release the lock around the provide reject() call:
1) the provider will do nothing with this endpoint until the iwcm either accepts or rejects.
2) the lock is only released after the iwcm state is changed, so an errant iwcm user that is destroying -and- rejecting the connection concurrently will get a failure on one of the calls.
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html