Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH for-4.7] nvme: Remove RCU namespace protection
Date: Wed, 22 Jun 2016 13:35:33 -0400	[thread overview]
Message-ID: <20160622173533.GI1448@localhost.localdomain> (raw)
In-Reply-To: <20160622161307.GA10592@infradead.org>

On Wed, Jun 22, 2016@09:13:07AM -0700, Christoph Hellwig wrote:
> I just had a quick look over this, and I'm a bit worried about
> the unlocked list walks, and the lack of grabbing a reference
> in nvme_find_ns.  I think by grabbing a reference in nvme_find_ns
> and dropping it once done we can already fix nvme_validate_ns and
> to nvme_scan_ns_list to be fully safe, and
> nvme_remove_invalid_namespaces might need some unlock and retry
> loops or a discard list so that we can lock the list traversal
> as well.  I think we should go that extra step to avoid any later
> pitfalls.

I think I follow what you're saying. I'll resend with your suggestions.

I was hoping to target 4.7 since that's the one that introduced the
two new bugs that we need to fix, and nvme_remove_invalid_namespaces
is set for 4.8. Now that I'm looking at it again, that function needs
to kill those namespace request queues prior to removal. Then we can
safely put them on a discard list since we'll never need to iterate
those namespaces again.

      reply	other threads:[~2016-06-22 17:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 22:32 [PATCH for-4.7] nvme: Remove RCU namespace protection Keith Busch
2016-06-21 22:43 ` Keith Busch
2016-06-22 10:04 ` Sagi Grimberg
2016-06-22 16:13 ` Christoph Hellwig
2016-06-22 17:35   ` Keith Busch [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=20160622173533.GI1448@localhost.localdomain \
    --to=keith.busch@intel.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