[PATCH 3/3] nvme: check that EUI/GUID/UUID are globally unique

Keith Busch kbusch at kernel.org
Thu Feb 24 09:12:55 PST 2022


On Thu, Feb 24, 2022 at 05:51:38PM +0100, Christoph Hellwig wrote:
> On Thu, Feb 24, 2022 at 07:43:04AM -0800, Keith Busch wrote:
> > It looks like a race condition exists here such that two namespaces with
> > duplicate IDs in different subsystems being concurrently added may not
> > see the duplicate.
> 
> Yes.  But do we care?  This is a sanity check.  The alternative would be
> to hold nvme_subsystems_lock for the whole ns_head probing, which is
> a little annoying.

I suppose whether we care or not depends on how many broken or dispersed
subsystems exist in the field. If it's too common, we may receive bug
reports for inconsistent namespace enumeration.

Holding the subsystem lock for the entire scan is annoying, though... I
guess just go with this patch and we'll see what happens.



More information about the Linux-nvme mailing list