Commit d892183a authored by Tim Gardner's avatar Tim Gardner Committed by Kamal Mostafa

Revert "UBUNTU: SAUCE: mm/mmap: fix oopsing on remap_file_pages"

BugLink: http://bugs.launchpad.net/bugs/1558120

This reverts commit c7082994.

Revert in favor of slightly different upstream patch.
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent ebb6639f
......@@ -2644,7 +2644,6 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
struct vm_area_struct *vma;
unsigned long populate = 0;
unsigned long ret = -EINVAL;
struct file *file;
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. "
"See Documentation/vm/remap_file_pages.txt.\n",
......@@ -2712,10 +2711,10 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
}
}
file = get_file(vma->vm_file);
vma_get_file(vma);
ret = do_mmap_pgoff(vma->vm_file, start, size,
prot, flags, pgoff, &populate);
fput(file);
vma_fput(vma);
out:
up_write(&mm->mmap_sem);
if (populate)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment