From: Keith Busch <kbusch@kernel.org>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-nvme@lists.infradead.org, sachinp@linux.vnet.com
Subject: Re: Kernel OOPS while creating a NVMe Namespace
Date: Mon, 10 Jun 2024 13:15:07 -0600 [thread overview]
Message-ID: <ZmdQuz8vJZMj41Kn@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <e8fa4c36-49e5-40b8-9cea-6b3b61aa3240@grimberg.me>
On Mon, Jun 10, 2024 at 10:05:00PM +0300, Sagi Grimberg wrote:
>
>
> On 10/06/2024 21:53, Keith Busch wrote:
> > On Mon, Jun 10, 2024 at 01:21:00PM +0530, Venkat Rao Bagalkote wrote:
> > > Issue is introduced by the patch: be647e2c76b27f409cdd520f66c95be888b553a3.
> > My mistake. The namespace remove list appears to be getting corrupted
> > because I'm using the wrong APIs to replace a "list_move_tail". This is
> > fixing the issue on my end:
> >
> > ---
> > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> > index 7c9f91314d366..c667290de5133 100644
> > --- a/drivers/nvme/host/core.c
> > +++ b/drivers/nvme/host/core.c
> > @@ -3959,9 +3959,10 @@ static void nvme_remove_invalid_namespaces(struct nvme_ctrl *ctrl,
> > mutex_lock(&ctrl->namespaces_lock);
> > list_for_each_entry_safe(ns, next, &ctrl->namespaces, list) {
> > - if (ns->head->ns_id > nsid)
> > - list_splice_init_rcu(&ns->list, &rm_list,
> > - synchronize_rcu);
> > + if (ns->head->ns_id > nsid) {
> > + list_del_rcu(&ns->list);
> > + list_add_tail_rcu(&ns->list, &rm_list);
> > + }
> > }
> > mutex_unlock(&ctrl->namespaces_lock);
> > synchronize_srcu(&ctrl->srcu);
> > --
>
> Can we add a reproducer for this in blktests? I'm assuming that we can
> easily trigger this
> with adding/removing nvmet namespaces?
I'm testing this with Namespace Manamgent commands, which nvmet doesn't
support. You can recreate the issue by detaching the last namespace.
next prev parent reply other threads:[~2024-06-10 19:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 7:51 Venkat Rao Bagalkote
2024-06-10 9:43 ` Hillf Danton
2024-06-10 9:57 ` Sagi Grimberg
2024-06-10 15:24 ` Keith Busch
2024-06-10 18:32 ` Chaitanya Kulkarni
2024-06-10 18:53 ` Keith Busch
2024-06-10 19:05 ` Sagi Grimberg
2024-06-10 19:15 ` Keith Busch [this message]
2024-06-10 19:17 ` Sagi Grimberg
2024-06-10 19:33 ` Keith Busch
2024-06-17 9:10 ` Nilay Shroff
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=ZmdQuz8vJZMj41Kn@kbusch-mbp.dhcp.thefacebook.com \
--to=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sachinp@linux.vnet.com \
--cc=sagi@grimberg.me \
--cc=venkat88@linux.vnet.ibm.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®