public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] iw_cm: Call provider listen_destroy function before changing state.
Date: Wed, 22 Feb 2012 14:20:58 -0600	[thread overview]
Message-ID: <4F454E2A.6060600@opengridcomputing.com> (raw)
In-Reply-To: <4F4549E9.3090102-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

On 02/22/2012 02:02 PM, Steve Wise wrote:
> On 02/22/2012 01:50 PM, Hefty, Sean wrote:
>>> diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
>>> index 1a696f7..3b43bba 100644
>>> --- a/drivers/infiniband/core/iwcm.c
>>> +++ b/drivers/infiniband/core/iwcm.c
>>> @@ -340,11 +340,11 @@ static void destroy_cm_id(struct iw_cm_id *cm_id)
>>>       spin_lock_irqsave(&cm_id_priv->lock, flags);
>>>       switch (cm_id_priv->state) {
>>>       case IW_CM_STATE_LISTEN:
>>> -        cm_id_priv->state = IW_CM_STATE_DESTROYING;
>>>           spin_unlock_irqrestore(&cm_id_priv->lock, flags);
>> What does this spinlock protect against if all we do is read the state under it?
>>
>
> Probably nothing in this particular path.  It seems to serialize adding/removing references to the qp and manipulating 
> cm_id_priv->qp.  But I don't want to revisit the entire serialization of this module. :)
>
> But the point of the patch is to destroy the listening endpoint in the provider _before_ we stop accepting connect 
> requests.
>

Oh you were pointing out that I could rearrange the spin lock usage here since we no longer set the state in this one case?
--
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

  parent reply	other threads:[~2012-02-22 20:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22 19:43 [PATCH] iw_cm: Call provider listen_destroy function before changing state Steve Wise
     [not found] ` <20120222194337.21025.30754.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2012-02-22 19:50   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A82373374F1119-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-02-22 20:02       ` Steve Wise
     [not found]         ` <4F4549E9.3090102-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2012-02-22 20:20           ` Steve Wise [this message]
2012-02-22 20:32   ` Roland Dreier
     [not found]     ` <CAG4TOxMXTzLDynza4KOaccx2C+Nn0485Xk_hXgg_bG0CiCTSEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-22 20:43       ` Steve Wise
     [not found]         ` <4F45536A.3050501-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2012-02-22 21:01           ` Steve Wise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F454E2A.6060600@opengridcomputing.com \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox