linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Keith Busch <keith.busch@intel.com>,
	Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>,
	Linux NVMe Mailinglist <linux-nvme@lists.infradead.org>,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH 2/5] nvme: don't hold nvmf_transports_rwsem for more than transport lookups
Date: Tue, 15 May 2018 09:48:26 +0200	[thread overview]
Message-ID: <20180515074826.GA23659@lst.de> (raw)
In-Reply-To: <20180515074043.22843-3-jthumshirn@suse.de>

> diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
> index 7ae732a77fe8..febf82639b40 100644
> --- a/drivers/nvme/host/fabrics.c
> +++ b/drivers/nvme/host/fabrics.c
> @@ -957,16 +957,17 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count)
>  
>  	down_read(&nvmf_transports_rwsem);
>  	ops = nvmf_lookup_transport(opts);
> +	up_read(&nvmf_transports_rwsem);

And what protects us from the transport getting unregister right here
from anothet thread waiting to acquire nvmf_transports_rwsem?

  reply	other threads:[~2018-05-15  7:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15  7:40 [PATCH 0/5] Misc NVMe lockdep fixes Johannes Thumshirn
2018-05-15  7:40 ` [PATCHv2 1/5] nvme: fix lockdep warning in nvme_mpath_clear_current_path Johannes Thumshirn
2018-05-15  8:11   ` Christoph Hellwig
2018-05-31  9:22   ` Sagi Grimberg
2018-05-15  7:40 ` [PATCH 2/5] nvme: don't hold nvmf_transports_rwsem for more than transport lookups Johannes Thumshirn
2018-05-15  7:48   ` Christoph Hellwig [this message]
2018-05-31  9:24     ` Sagi Grimberg
2018-05-15  7:40 ` [PATCH 3/5] nvme: call nvmf_create_ctrl before checking for duplicate assignment Johannes Thumshirn
2018-05-15  7:50   ` Christoph Hellwig
2018-05-15  7:52     ` Johannes Thumshirn
2018-05-31  9:26       ` Sagi Grimberg
2018-05-15  7:40 ` [PATCH 4/5] nvmet: use atomic allocations when allocating fc requests Johannes Thumshirn
2018-05-31  9:31   ` Sagi Grimberg
2018-06-12 20:36     ` James Smart
2018-06-12 20:39   ` James Smart
2018-05-15  7:40 ` [PATCH 5/5] nvmet: fcloop: use irqsave spinlocks Johannes Thumshirn
2018-05-31  9:37   ` Sagi Grimberg
2018-06-12 20:41   ` James Smart
2018-06-12 20:48   ` Jens Axboe

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=20180515074826.GA23659@lst.de \
    --to=hch@lst.de \
    --cc=hare@suse.de \
    --cc=jthumshirn@suse.de \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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).