]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - kernel/fork.c
Revert "x86/mm: Only set IBPB when the new thread cannot ptrace current thread"
[mirror_ubuntu-artful-kernel.git] / kernel / fork.c
index 9ee3c7cc98508ea450b3097748727b36b56bb1a7..1d907772b9d255c1b4a32dec2eb1262678f36ee7 100644 (file)
@@ -712,8 +712,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
                        goto out;
        }
        /* a new mm has just been created */
-       arch_dup_mmap(oldmm, mm);
-       retval = 0;
+       retval = arch_dup_mmap(oldmm, mm);
 out:
        up_write(&mm->mmap_sem);
        flush_tlb_mm(oldmm);
@@ -1718,6 +1717,9 @@ static __latent_entropy struct task_struct *copy_process(
        p->sequential_io        = 0;
        p->sequential_io_avg    = 0;
 #endif
+#ifdef CONFIG_SECURITY
+       p->security = NULL;
+#endif
 
        /* Perform scheduler related setup. Assign this task to a CPU. */
        retval = sched_fork(clone_flags, p);