mirror of
https://github.com/torvalds/linux
synced 2024-10-22 19:25:51 +00:00
libnvdimm, pfn: fix uuid validation
commit e5670563f5
upstream.
If we detect a namespace has a stale info block in the init path, we
should overwrite with the latest configuration. In fact, we already
return -ENODEV when the parent uuid is invalid, the same should be done
for the 'self' uuid. Otherwise we can get into a condition where
userspace is unable to reconfigure the pfn-device without directly /
manually invalidating the info block.
Reported-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fa07cf6613
commit
966bf1bea4
|
@ -275,7 +275,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn)
|
|||
} else {
|
||||
/* from init we validate */
|
||||
if (memcmp(nd_pfn->uuid, pfn_sb->uuid, 16) != 0)
|
||||
return -EINVAL;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue