diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-26 12:24:47 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-26 12:24:47 -0800 |
commit | 30e2b7cfc54c1efa0aa4c75eb8aa19318e3932e3 (patch) | |
tree | 5ab19d0fcbe00a2d2ce1143818764d20411fe8e6 /drivers/dax/pmem.c | |
parent | fc13ca191ee2ae5f379e2933cdff523c3b4fffc9 (diff) | |
parent | 4cb19355ea19995941ccaad115dbfac6b75215ca (diff) |
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams:
- Fix a crash that occurs at driver initialization if the memory region
is already busy (request_mem_region() fails).
- Fix a vma validation check that mistakenly allows a private device-
dax mapping to be established. Device-dax explicitly forbids private
mappings so it can guarantee a given fault granularity and backing
memory type.
Both of these fixes have soaked in -next and are tagged for -stable.
* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
device-dax: fail all private mapping attempts
device-dax: check devm_nsio_enable() return value
Diffstat (limited to 'drivers/dax/pmem.c')
-rw-r--r-- | drivers/dax/pmem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c index 4a15fa5df98b..73c6ce93a0d9 100644 --- a/drivers/dax/pmem.c +++ b/drivers/dax/pmem.c @@ -78,7 +78,9 @@ static int dax_pmem_probe(struct device *dev) nsio = to_nd_namespace_io(&ndns->dev); /* parse the 'pfn' info block via ->rw_bytes */ - devm_nsio_enable(dev, nsio); + rc = devm_nsio_enable(dev, nsio); + if (rc) + return rc; altmap = nvdimm_setup_pfn(nd_pfn, &res, &__altmap); if (IS_ERR(altmap)) return PTR_ERR(altmap); |