linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH] Use rsps_lock in nvmet_rdma_free_rsp
Date: Thu, 24 Nov 2016 23:53:54 -0800	[thread overview]
Message-ID: <20161125075354.GA14095@infradead.org> (raw)
In-Reply-To: <923efced268f42a19eb96d593894d141@TGXML382.toshiba.local>

On Fri, Nov 25, 2016@05:00:26AM +0000, Tomita.Haruo@toshiba-sol.co.jp wrote:
> Hi Christoph,
> 
> Thank you for your reply.
> 
> > what are you trying to protect against during device teardown?
> 
> I'm trying to protect nvmet_rdma_get_rsp and nvmet_rdma_put_rsp.
> In these functions, queue->free_rsps is protected by rsps_lock.
> rsp->free_list is also protected at the same time.

If we can invoke these functions concurrently with nvmet_rdma_free_rsp
we have sever life time rule error.  Under what circumstances do you
see such concurrency?

> I am investigating whether there is a race issue on the target of nvme.
> For another function, I also think of the following patch.

What do you try to protect against with this patch?

  reply	other threads:[~2016-11-25  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22  5:36 [PATCH] Use rsps_lock in nvmet_rdma_free_rsp Tomita.Haruo
2016-11-22  7:41 ` Christoph Hellwig
2016-11-25  5:00   ` Tomita.Haruo
2016-11-25  7:53     ` Christoph Hellwig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-11-22  5:32 Tomita.Haruo

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=20161125075354.GA14095@infradead.org \
    --to=hch@infradead.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).