Lines Matching refs:oldmm
613 static void dup_mm_exe_file(struct mm_struct *mm, struct mm_struct *oldmm)
617 exe_file = get_mm_exe_file(oldmm);
620 * We depend on the oldmm having properly denied write access to the
629 struct mm_struct *oldmm)
638 if (mmap_write_lock_killable(oldmm)) {
642 flush_cache_dup_mm(oldmm);
643 uprobe_dup_mmap(oldmm, mm);
650 dup_mm_exe_file(mm, oldmm);
652 mm->total_vm = oldmm->total_vm;
653 mm->data_vm = oldmm->data_vm;
654 mm->exec_vm = oldmm->exec_vm;
655 mm->stack_vm = oldmm->stack_vm;
657 retval = ksm_fork(mm, oldmm);
660 khugepaged_fork(mm, oldmm);
663 retval = __mt_dup(&oldmm->mm_mt, &mm->mm_mt, GFP_KERNEL);
693 if (security_vm_enough_memory_mm(oldmm, len)) /* sic */
759 retval = arch_dup_mmap(oldmm, mm);
777 flush_tlb_mm(oldmm);
778 mmap_write_unlock(oldmm);
807 static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
809 mmap_write_lock(oldmm);
810 dup_mm_exe_file(mm, oldmm);
811 mmap_write_unlock(oldmm);
1666 * @oldmm: the mm to duplicate.
1668 * Allocates a new mm structure and duplicates the provided @oldmm structure
1674 struct mm_struct *oldmm)
1683 memcpy(mm, oldmm, sizeof(*mm));
1688 err = dup_mmap(mm, oldmm);
1712 struct mm_struct *mm, *oldmm;
1729 oldmm = current->mm;
1730 if (!oldmm)
1734 mmget(oldmm);
1735 mm = oldmm;