Lines Matching refs:oldmm
481 struct mm_struct *oldmm)
490 if (mmap_write_lock_killable(oldmm)) {
494 flush_cache_dup_mm(oldmm);
495 uprobe_dup_mmap(oldmm, mm);
502 RCU_INIT_POINTER(mm->exe_file, get_mm_exe_file(oldmm));
504 mm->total_vm = oldmm->total_vm;
505 mm->data_vm = oldmm->data_vm;
506 mm->exec_vm = oldmm->exec_vm;
507 mm->stack_vm = oldmm->stack_vm;
512 retval = ksm_fork(mm, oldmm);
515 retval = khugepaged_fork(mm, oldmm);
520 for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
539 if (security_vm_enough_memory_mm(oldmm, len)) /* sic */
613 retval = arch_dup_mmap(oldmm, mm);
616 flush_tlb_mm(oldmm);
617 mmap_write_unlock(oldmm);
647 static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
649 mmap_write_lock(oldmm);
650 RCU_INIT_POINTER(mm->exe_file, get_mm_exe_file(oldmm));
651 mmap_write_unlock(oldmm);
1375 * @oldmm: the mm to duplicate.
1377 * Allocates a new mm structure and duplicates the provided @oldmm structure
1383 struct mm_struct *oldmm)
1392 memcpy(mm, oldmm, sizeof(*mm));
1397 err = dup_mmap(mm, oldmm);
1421 struct mm_struct *mm, *oldmm;
1439 oldmm = current->mm;
1440 if (!oldmm)
1447 mmget(oldmm);
1448 mm = oldmm;