linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Krishnamraju Eraparaju <krishna2@chelsio.com>
Cc: dledford@redhat.com, linux-rdma@vger.kernel.org,
	bharat@chelsio.com, nirranjan@chelsio.com
Subject: Re: [PATCH for-rc] RDMA/iw_cxgb4: initiate CLOSE when entering TERM
Date: Tue, 11 Feb 2020 14:30:28 -0400	[thread overview]
Message-ID: <20200211183028.GA13933@ziepe.ca> (raw)
In-Reply-To: <20200204091230.7210-1-krishna2@chelsio.com>

On Tue, Feb 04, 2020 at 02:42:30PM +0530, Krishnamraju Eraparaju wrote:
> - As per draft-hilland-iwarp-verbs-v1.0, sec 6.2.3,
>   always initiate a CLOSE when entering into TERM state.
> 
> - In c4iw_modify_qp(), disconnect operation should only be performed
>   when the modify_qp call is invoked from ib_core. And all other
>   internal modify_qp calls(invoked within iw_cxgb4) that needs
>   'disconnect' should call c4iw_ep_disconnect() explicitly
>   after modify_qp. Otherwise, deadlocks like below can occur:
> 
>  Call Trace:
>   schedule+0x2f/0xa0
>   schedule_preempt_disabled+0xa/0x10
>   __mutex_lock.isra.5+0x2d0/0x4a0
>   c4iw_ep_disconnect+0x39/0x430    => tries to reacquire ep lock again
>   c4iw_modify_qp+0x468/0x10d0
>   rx_data+0x218/0x570              => acquires ep lock
>   process_work+0x5f/0x70
>   process_one_work+0x1a7/0x3b0
>   worker_thread+0x30/0x390
>   kthread+0x112/0x130
>   ret_from_fork+0x35/0x40
> 
> Fixes: d2c33370ae73 ("RDMA/iw_cxgb4: Always disconnect when QP is
> transitioning to TERMINATE state")
> Signed-off-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
> ---
>  drivers/infiniband/hw/cxgb4/cm.c | 4 ++++
>  drivers/infiniband/hw/cxgb4/qp.c | 4 ++--
>  2 files changed, 6 insertions(+), 2 deletions(-)

Applied to for-rc, thanks

Jason

      reply	other threads:[~2020-02-11 18:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  9:12 [PATCH for-rc] RDMA/iw_cxgb4: initiate CLOSE when entering TERM Krishnamraju Eraparaju
2020-02-11 18:30 ` Jason Gunthorpe [this message]

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=20200211183028.GA13933@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=bharat@chelsio.com \
    --cc=dledford@redhat.com \
    --cc=krishna2@chelsio.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    /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).