Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+5 -3
+2 -2
drivers/dax/dax.c
··· 270 270 if (!dax_dev->alive) 271 271 return -ENXIO; 272 272 273 - /* prevent private / writable mappings from being established */ 274 - if ((vma->vm_flags & (VM_NORESERVE|VM_SHARED|VM_WRITE)) == VM_WRITE) { 273 + /* prevent private mappings from being established */ 274 + if ((vma->vm_flags & VM_SHARED) != VM_SHARED) { 275 275 dev_info(dev, "%s: %s: fail, attempted private mapping\n", 276 276 current->comm, func); 277 277 return -EINVAL;
+3 -1
drivers/dax/pmem.c
··· 78 78 nsio = to_nd_namespace_io(&ndns->dev); 79 79 80 80 /* parse the 'pfn' info block via ->rw_bytes */ 81 - devm_nsio_enable(dev, nsio); 81 + rc = devm_nsio_enable(dev, nsio); 82 + if (rc) 83 + return rc; 82 84 altmap = nvdimm_setup_pfn(nd_pfn, &res, &__altmap); 83 85 if (IS_ERR(altmap)) 84 86 return PTR_ERR(altmap);