mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Tristan Madani <tristmd@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>,
	Caleb Sander <csander@purestorage.com>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org,
	Tristan Madani <tristan@talencesecurity.com>
Subject: Re: [PATCH] nvme: add missing SRCU grace period in error path
Date: Mon, 24 Aug 2026 18:54:01 -0600	[thread overview]
Message-ID: <aoznqfUpR3t-GpgE@kbusch-mbp> (raw)
In-Reply-To: <20260815001427.3148050-1-tristmd@gmail.com>

On Sat, Aug 15, 2026 at 12:14:27AM +0000, Tristan Madani wrote:
> From: Tristan Madani <tristan@talencesecurity.com>
> 
> nvme_alloc_ns() error path at out_unlink_ns removes ns from the
> namespace head siblings list with list_del_rcu(&ns->siblings) but
> does not wait for SRCU readers before freeing the namespace struct.
> Multipath code iterates the head->list under srcu_read_lock() in
> nvme_find_path() and nvme_mpath_revalidate_paths(), so a concurrent
> reader can still hold a reference to ns when kfree(ns) runs.
> 
> The normal removal path in nvme_ns_remove() correctly calls
> synchronize_srcu(&ns->head->srcu) after list_del_rcu() to wait for
> in-progress readers. Add the same grace period in the error path.

Thanks, applied to nvme-7.3.

      parent reply	other threads:[~2026-08-25  0:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-15  0:14 Tristan Madani
2026-08-17  7:00 ` Christoph Hellwig
2026-08-17 14:46 ` John Garry
2026-08-23  0:25 ` Sagi Grimberg
2026-08-25  0:54 ` 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=aoznqfUpR3t-GpgE@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=stable@vger.kernel.org \
    --cc=tristan@talencesecurity.com \
    --cc=tristmd@gmail.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

all inboxes | Powered by JetHome®