* [PATCH] iWCM: Do not call provider reject method with irqs disabled.
@ 2009-09-28 19:03 Steve Wise
[not found] ` <20090928190328.26092.69566.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Steve Wise @ 2009-09-28 19:03 UTC (permalink / raw)
To: rdreier-FYB4Gu1CFyUAvxtiuMwx3w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
drivers/infiniband/core/iwcm.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 55d093a..625fec5 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20090928190328.26092.69566.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>]
* Re: [PATCH] iWCM: Do not call provider reject method with irqs disabled. [not found] ` <20090928190328.26092.69566.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org> @ 2009-09-29 16:27 ` Roland Dreier [not found] ` <adaocotvhq4.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Roland Dreier @ 2009-09-29 16:27 UTC (permalink / raw) To: Steve Wise; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <adaocotvhq4.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] iWCM: Do not call provider reject method with irqs disabled. [not found] ` <adaocotvhq4.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> @ 2009-09-29 17:39 ` Steve Wise 0 siblings, 0 replies; 3+ messages in thread From: Steve Wise @ 2009-09-29 17:39 UTC (permalink / raw) To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA Roland Dreier wrote: > 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-29 17:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-28 19:03 [PATCH] iWCM: Do not call provider reject method with irqs disabled Steve Wise
[not found] ` <20090928190328.26092.69566.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2009-09-29 16:27 ` Roland Dreier
[not found] ` <adaocotvhq4.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-29 17:39 ` Steve Wise
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox