Skip to contentSkip to conversation

nvme: ns_head vs namespace mismatch fixes

DISCUSSION Anton Eidelman 2 participants 2 messages Mar 14, 2021 Stable branch

lore
Share & tools
lore
#0 lore 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 an ID mismatch, and consequently a potential crash later.

Signature · 19 lines
*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.*
maintainer
#1 lore raw
Quoted 11 lines · Anton Eidelman

*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.*

email deleted.