linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Krishnamraju Eraparaju <krishna2@chelsio.com>
Cc: linux-rdma@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH v3] iwcm: don't hold the irq disabled lock on iw_rem_ref
Date: Tue, 10 Sep 2019 09:53:13 -0700	[thread overview]
Message-ID: <5cc42f23-bf60-ca8d-f40c-cbd8875f5756@grimberg.me> (raw)
In-Reply-To: <20190910111759.GA5472@chelsio.com>


>> This may be the final put on a qp and result in freeing
>> resourcesand should not be done with interrupts disabled.
> 
> Hi Sagi,
> 
> Few things to consider in fixing this completely:
>    - there are some other places where iw_rem_ref() should be called
>      after spinlock critical section. eg: in cm_close_handler(),
> iw_cm_connect(),...
>    - Any modifications to "cm_id_priv" should be done with in spinlock
>      critical section, modifying cm_id_priv->qp outside spinlocks, even
> with atomic xchg(), might be error prone.
>    - the structure "siw_base_qp" is getting freed in siw_destroy_qp(),
>      but it should be done at the end of siw_free_qp().

Not sure why you say that, at the end of this function ->qp will be null
anyways...

>    
> I am about to finish writing a patch that cover all the above issues.
> Will test it and submit here by EOD.

Sure, you take it. Just stumbled on it so thought I'd go ahead and send
a patch...

  reply	other threads:[~2019-09-10 16:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 21:25 [PATCH v3] iwcm: don't hold the irq disabled lock on iw_rem_ref Sagi Grimberg
2019-09-10 11:18 ` Krishnamraju Eraparaju
2019-09-10 16:53   ` Sagi Grimberg [this message]
2019-09-10 19:21     ` Krishnamraju Eraparaju
2019-09-11  9:38     ` Bernard Metzler
2019-09-11 14:42       ` Steve Wise
2019-09-11 15:58         ` Krishnamraju Eraparaju
2019-09-16 16:28           ` Jason Gunthorpe
2019-09-17  9:04           ` Bernard Metzler
2019-09-17 12:47             ` Krishnamraju Eraparaju
2019-09-17 13:40             ` Bernard Metzler
2019-09-17 17:20             ` Sagi Grimberg
2019-09-18 13:43               ` Krishnamraju Eraparaju
2019-09-21 18:35                 ` Krishnamraju Eraparaju
2019-10-01 17:17                   ` Krishnamraju Eraparaju

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=5cc42f23-bf60-ca8d-f40c-cbd8875f5756@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=jgg@ziepe.ca \
    --cc=krishna2@chelsio.com \
    --cc=linux-rdma@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).