summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-09-03 10:36:00 -0700
committerDan Williams <dan.j.williams@intel.com>2016-09-03 10:40:57 -0700
commit4c3cb6e9a9d94d1553807854a565cd27ff4c22aa (patch)
tree3080bceb1954d684c570fa96337098f433165f9b /drivers
parent3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff)
downloadlinux-4c3cb6e9a9d94d1553807854a565cd27ff4c22aa.tar.gz
linux-4c3cb6e9a9d94d1553807854a565cd27ff4c22aa.tar.bz2
linux-4c3cb6e9a9d94d1553807854a565cd27ff4c22aa.zip
dax: fix mapping size check
pgoff_to_phys() validates that both the starting address and the length of the mapping against the resource list. We need to check for a mapping size of PMD_SIZE not PAGE_SIZE in the pmd fault path. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dax/dax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c
index 803f3953b341..29f600f2c447 100644
--- a/drivers/dax/dax.c
+++ b/drivers/dax/dax.c
@@ -459,7 +459,7 @@ static int __dax_dev_pmd_fault(struct dax_dev *dax_dev,
}
pgoff = linear_page_index(vma, pmd_addr);
- phys = pgoff_to_phys(dax_dev, pgoff, PAGE_SIZE);
+ phys = pgoff_to_phys(dax_dev, pgoff, PMD_SIZE);
if (phys == -1) {
dev_dbg(dev, "%s: phys_to_pgoff(%#lx) failed\n", __func__,
pgoff);