Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kbusch@kernel.org (Keith Busch)
Subject: [PATCH] nvme-multipath: avoid crash on invalid subsystem cntlid enumeration
Date: Tue, 2 Apr 2019 02:55:40 -0600	[thread overview]
Message-ID: <20190402085540.GE16792@localhost.localdomain> (raw)
In-Reply-To: <d50e5b7e-9ccb-3f9f-1ab0-2324298e0a52@suse.de>

On Mon, Apr 01, 2019@04:50:13AM -0700, Hannes Reinecke wrote:
> On 4/1/19 7:17 AM, Keith Busch wrote:
> > We might want to use this patch anyway. It is possible some process
> > reference count is preventing the final release when we want to remove
> > a controller, and a subsequent discover, even if the cntlid is unqiue,
> > would create a duplicate disk name.
> > 
> I don't mind which patch is taken.
> But crashing on misbehaving targets is never a good idea.

I 100% agree. :)
 
> Do I need to send the other patch?

Can we do both? I like the warning when an invalid subsystem is detected,
but your original patch fixes the unique gendisk name, so I'd vote
to keep that good code, but justify it with a slightly different
changelog. Something along the following:

  A process holding an open reference to a removed disk prevents it
  from completing deletion, so its name continues to exist. A subsequent
  gendisk creation may have the same cntlid which risks collision when
  using that for the name. Use the unique ctrl->instance instead.

  reply	other threads:[~2019-04-02  8:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29  9:57 [PATCH] nvme-multipath: avoid crash on invalid subsystem cntlid enumeration Hannes Reinecke
2019-03-29 10:02 ` Christoph Hellwig
2019-03-29 10:23   ` Hannes Reinecke
2019-04-01  5:17     ` Keith Busch
2019-04-01 11:50       ` Hannes Reinecke
2019-04-02  8:55         ` Keith Busch [this message]
2019-04-03 18:09           ` Christoph Hellwig

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=20190402085540.GE16792@localhost.localdomain \
    --to=kbusch@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