The patch titled Subject: mm: remap_file_pages: grab file ref to prevent race while mmaping has been removed from the -mm tree. Its filename was mm-replace-remap_file_pages-syscall-with-emulation-fix-3.patch This patch was dropped because it was folded into mm-replace-remap_file_pages-syscall-with-emulation.patch ------------------------------------------------------ From: Sasha Levin <sasha.levin@xxxxxxxxxx> Subject: mm: remap_file_pages: grab file ref to prevent race while mmaping A file reference should be held while a file is mmaped, otherwise it might be freed while being used. Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx> Suggested-by: Hugh Dickins <hughd@xxxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mmap.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN mm/mmap.c~mm-replace-remap_file_pages-syscall-with-emulation-fix-3 mm/mmap.c --- a/mm/mmap.c~mm-replace-remap_file_pages-syscall-with-emulation-fix-3 +++ a/mm/mmap.c @@ -2616,6 +2616,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsign 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", @@ -2659,8 +2660,10 @@ SYSCALL_DEFINE5(remap_file_pages, unsign munlock_vma_pages_range(vma, start, start + size); } + file = get_file(vma->vm_file); ret = do_mmap_pgoff(vma->vm_file, start, size, prot, flags, pgoff, &populate); + fput(file); out: up_write(&mm->mmap_sem); if (populate) _ Patches currently in -mm which might be from sasha.levin@xxxxxxxxxx are origin.patch vmstat-on-demand-vmstat-workers-v8-fix-2.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch do_shared_fault-check-that-mmap_sem-is-held.patch linux-next.patch mm-replace-remap_file_pages-syscall-with-emulation.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html