aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index c2d4c477e5bb..d3ee2ea5615c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1672,8 +1672,14 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
1672 vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; 1672 vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
1673 1673
1674 err = track_pfn_vma_new(vma, prot, pfn, PAGE_ALIGN(size)); 1674 err = track_pfn_vma_new(vma, prot, pfn, PAGE_ALIGN(size));
1675 if (err) 1675 if (err) {
1676 /*
1677 * To indicate that track_pfn related cleanup is not
1678 * needed from higher level routine calling unmap_vmas
1679 */
1680 vma->vm_flags &= ~(VM_IO | VM_RESERVED | VM_PFNMAP);
1676 return -EINVAL; 1681 return -EINVAL;
1682 }
1677 1683
1678 BUG_ON(addr >= end); 1684 BUG_ON(addr >= end);
1679 pfn -= addr >> PAGE_SHIFT; 1685 pfn -= addr >> PAGE_SHIFT;