Message ID | 20200108065219.171221-5-aneesh.kumar@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/6] libnvdimm/namespace: Make namespace size validation arch dependent | expand |
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index 99e6140bb19d..dd2d65c76fcf 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -563,6 +563,8 @@ static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, return; } + valid->start = ALIGN(valid->start, arch_namespace_align_size()); + /* allocation needs to be contiguous, so this is all or nothing */ if (resource_size(valid) < n) goto invalid;
When creating new namespace make sure DPA address are properly aligned based on arch restrictions. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> --- drivers/nvdimm/namespace_devs.c | 2 ++ 1 file changed, 2 insertions(+)