diff options
| author | Paul Moore <pmoore@redhat.com> | 2014-01-28 14:44:16 -0500 |
|---|---|---|
| committer | Paul Moore <pmoore@redhat.com> | 2014-02-05 10:39:48 -0500 |
| commit | 825e587af2e90e9b953849f3347a01d8f383d577 (patch) | |
| tree | e48942a05882da47544e179c6a0c920e00137a6a /kernel/fork.c | |
| parent | 8ed814602876bec9bad2649ca17f34b499357a1c (diff) | |
| parent | d8ec26d7f8287f5788a494f56e8814210f0e64be (diff) | |
Merge tag 'v3.13' into stable-3.14
Linux 3.13
Conflicts:
security/selinux/hooks.c
Trivial merge issue in selinux_inet_conn_request() likely due to me
including patches that I sent to the stable folks in my next tree
resulting in the patch hitting twice (I think). Thankfully it was an
easy fix this time, but regardless, lesson learned, I will not do that
again.
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 086fe73ad6bd..dfa736c98d17 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -532,11 +532,12 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) | |||
| 532 | mm->flags = (current->mm) ? | 532 | mm->flags = (current->mm) ? |
| 533 | (current->mm->flags & MMF_INIT_MASK) : default_dump_filter; | 533 | (current->mm->flags & MMF_INIT_MASK) : default_dump_filter; |
| 534 | mm->core_state = NULL; | 534 | mm->core_state = NULL; |
| 535 | mm->nr_ptes = 0; | 535 | atomic_long_set(&mm->nr_ptes, 0); |
| 536 | memset(&mm->rss_stat, 0, sizeof(mm->rss_stat)); | 536 | memset(&mm->rss_stat, 0, sizeof(mm->rss_stat)); |
| 537 | spin_lock_init(&mm->page_table_lock); | 537 | spin_lock_init(&mm->page_table_lock); |
| 538 | mm_init_aio(mm); | 538 | mm_init_aio(mm); |
| 539 | mm_init_owner(mm, p); | 539 | mm_init_owner(mm, p); |
| 540 | clear_tlb_flush_pending(mm); | ||
| 540 | 541 | ||
| 541 | if (likely(!mm_alloc_pgd(mm))) { | 542 | if (likely(!mm_alloc_pgd(mm))) { |
| 542 | mm->def_flags = 0; | 543 | mm->def_flags = 0; |
| @@ -560,7 +561,7 @@ static void check_mm(struct mm_struct *mm) | |||
| 560 | "mm:%p idx:%d val:%ld\n", mm, i, x); | 561 | "mm:%p idx:%d val:%ld\n", mm, i, x); |
| 561 | } | 562 | } |
| 562 | 563 | ||
| 563 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 564 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS |
| 564 | VM_BUG_ON(mm->pmd_huge_pte); | 565 | VM_BUG_ON(mm->pmd_huge_pte); |
| 565 | #endif | 566 | #endif |
| 566 | } | 567 | } |
| @@ -814,12 +815,9 @@ struct mm_struct *dup_mm(struct task_struct *tsk) | |||
| 814 | memcpy(mm, oldmm, sizeof(*mm)); | 815 | memcpy(mm, oldmm, sizeof(*mm)); |
| 815 | mm_init_cpumask(mm); | 816 | mm_init_cpumask(mm); |
| 816 | 817 | ||
| 817 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 818 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS |
| 818 | mm->pmd_huge_pte = NULL; | 819 | mm->pmd_huge_pte = NULL; |
| 819 | #endif | 820 | #endif |
| 820 | #ifdef CONFIG_NUMA_BALANCING | ||
| 821 | mm->first_nid = NUMA_PTE_SCAN_INIT; | ||
| 822 | #endif | ||
| 823 | if (!mm_init(mm, tsk)) | 821 | if (!mm_init(mm, tsk)) |
| 824 | goto fail_nomem; | 822 | goto fail_nomem; |
| 825 | 823 | ||
| @@ -1174,7 +1172,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
| 1174 | * do not allow it to share a thread group or signal handlers or | 1172 | * do not allow it to share a thread group or signal handlers or |
| 1175 | * parent with the forking task. | 1173 | * parent with the forking task. |
| 1176 | */ | 1174 | */ |
| 1177 | if (clone_flags & (CLONE_SIGHAND | CLONE_PARENT)) { | 1175 | if (clone_flags & CLONE_SIGHAND) { |
| 1178 | if ((clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) || | 1176 | if ((clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) || |
| 1179 | (task_active_pid_ns(current) != | 1177 | (task_active_pid_ns(current) != |
| 1180 | current->nsproxy->pid_ns_for_children)) | 1178 | current->nsproxy->pid_ns_for_children)) |
| @@ -1313,7 +1311,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
| 1313 | #endif | 1311 | #endif |
| 1314 | 1312 | ||
| 1315 | /* Perform scheduler related setup. Assign this task to a CPU. */ | 1313 | /* Perform scheduler related setup. Assign this task to a CPU. */ |
| 1316 | sched_fork(p); | 1314 | sched_fork(clone_flags, p); |
| 1317 | 1315 | ||
| 1318 | retval = perf_event_init_task(p); | 1316 | retval = perf_event_init_task(p); |
| 1319 | if (retval) | 1317 | if (retval) |
| @@ -1373,7 +1371,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
| 1373 | INIT_LIST_HEAD(&p->pi_state_list); | 1371 | INIT_LIST_HEAD(&p->pi_state_list); |
| 1374 | p->pi_state_cache = NULL; | 1372 | p->pi_state_cache = NULL; |
| 1375 | #endif | 1373 | #endif |
| 1376 | uprobe_copy_process(p); | ||
| 1377 | /* | 1374 | /* |
| 1378 | * sigaltstack should be cleared when sharing the same VM | 1375 | * sigaltstack should be cleared when sharing the same VM |
| 1379 | */ | 1376 | */ |
| @@ -1490,6 +1487,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
| 1490 | perf_event_fork(p); | 1487 | perf_event_fork(p); |
| 1491 | 1488 | ||
| 1492 | trace_task_newtask(p, clone_flags); | 1489 | trace_task_newtask(p, clone_flags); |
| 1490 | uprobe_copy_process(p, clone_flags); | ||
| 1493 | 1491 | ||
| 1494 | return p; | 1492 | return p; |
| 1495 | 1493 | ||
