--- zzzz-none-000/linux-2.6.39.4/kernel/fork.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/kernel/fork.c 2021-11-10 13:38:18.000000000 +0000 @@ -11,6 +11,11 @@ * management can be a bitch. See 'mm/memory.c': 'copy_page_range()' */ +/* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017 , Intel Corporation. + */ + #include #include #include @@ -324,7 +329,9 @@ */ down_write_nested(&mm->mmap_sem, SINGLE_DEPTH_NESTING); +#ifndef CONFIG_MLOCK_APPS mm->locked_vm = 0; +#endif mm->mmap = NULL; mm->mmap_cache = NULL; mm->free_area_cache = oldmm->mmap_base; @@ -373,7 +380,9 @@ tmp->vm_mm = mm; if (anon_vma_fork(tmp, mpnt)) goto fail_nomem_anon_vma_fork; +#ifndef CONFIG_MLOCK_APPS tmp->vm_flags &= ~VM_LOCKED; +#endif tmp->vm_next = tmp->vm_prev = NULL; file = tmp->vm_file; if (file) { @@ -505,7 +514,11 @@ atomic_set(&mm->oom_disable_count, 0); if (likely(!mm_alloc_pgd(mm))) { +#ifdef CONFIG_MLOCK_APPS + mm->def_flags = (current->mm) ? current->mm->def_flags & VM_LOCKED : 0; +#else mm->def_flags = 0; +#endif mmu_notifier_mm_init(mm); return mm; } @@ -1098,6 +1111,8 @@ p->default_timer_slack_ns = current->timer_slack_ns; + p->netmark = current->netmark; /* AVM calle */ + task_io_accounting_init(&p->ioac); acct_clear_integrals(p);