From: Anton Eidelman <anton@lightbitslabs.com>
To: stable@vger.kernel.org
Cc: kbusch@kernel.org, sagi@grimberg.me, hch@lst.de
Subject: nvme: ns_head vs namespace mismatch fixes
Date: Sat, 13 Mar 2021 20:07:03 -0800 [thread overview]
Message-ID: <20210314040705.1357858-1-anton@lightbitslabs.com> (raw)
Please, apply the following two upstream commits (attached)
(in this order):
d567572906d9 nvme: unlink head after removing last namespace
ac262508daa8 nvme: release namespace head reference on error
TO: v5.4, v5.5, v5.6, v5.7
These commits are present in v5.8
and apply cleanly to the above.
Reason:
These fix a potential crash or malfunction
when an nvme namespace is deleted
and then a new namespace with the same nsid is created
before the old ns_head for this nsid is gone.
The first commit prevents the new namespace
from being matched by nvme_init_ns_head()
with the old ns_head causing ID mismatch
and consequently a failure to initialize the new namespace.
The second commit prevents ns_head refcount imbalance
in case nvme_init_ns_head() detects ID mismatch,
and consequently a crash later.
--
*Lightbits Labs**
*Lead the cloud-native data center
transformation by
delivering *scalable *and *efficient *software
defined storage that is
*easy *to consume.
*This message is sent in confidence for the addressee
only. It
may contain legally privileged information. The contents are not
to be
disclosed to anyone other than the addressee. Unauthorized recipients
are
requested to preserve this confidentiality, advise the sender
immediately of
any error in transmission and delete the email from their
systems.*
next reply other threads:[~2021-03-14 4:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 4:07 Anton Eidelman [this message]
2021-03-14 4:07 ` [PATCH 1/3] nvme: unlink head after removing last namespace Anton Eidelman
2021-03-14 7:20 ` Greg KH
2021-03-14 7:20 ` nvme: ns_head vs namespace mismatch fixes Greg KH
2021-03-15 17:35 ` Sagi Grimberg
-- strict thread matches above, loose matches on Subject: below --
2021-03-14 4:13 Anton Eidelman
2021-03-14 4:30 ` Keith Busch
2021-03-14 7:21 ` Greg KH
2021-03-14 4:00 Anton Eidelman
2021-03-14 7:21 ` Greg KH
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=20210314040705.1357858-1-anton@lightbitslabs.com \
--to=anton@lightbitslabs.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=sagi@grimberg.me \
--cc=stable@vger.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