Merge remote-tracking branches 'regulator/fix/ab3100' and 'regulator/fix/s2mps11...
[firefly-linux-kernel-4.4.55.git] / fs / exec.c
index f860866e04ba1bd2e16d3c00f6c9e8c8b44cabba..e1529b4c79b1c29b300ab6519a94d7b748069e33 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -842,7 +842,6 @@ static int exec_mmap(struct mm_struct *mm)
        tsk->active_mm = mm;
        activate_mm(active_mm, mm);
        task_unlock(tsk);
-       arch_pick_mmap_layout(mm);
        if (old_mm) {
                up_read(&old_mm->mmap_sem);
                BUG_ON(active_mm != old_mm);
@@ -1087,8 +1086,8 @@ int flush_old_exec(struct linux_binprm * bprm)
        bprm->mm = NULL;                /* We're using it now */
 
        set_fs(USER_DS);
-       current->flags &=
-               ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE);
+       current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD |
+                                       PF_NOFREEZE | PF_NO_SETAFFINITY);
        flush_thread();
        current->personality &= ~bprm->per_clear;
 
@@ -1424,7 +1423,6 @@ static int exec_binprm(struct linux_binprm *bprm)
                audit_bprm(bprm);
                trace_sched_process_exec(current, old_pid, bprm);
                ptrace_event(PTRACE_EVENT_EXEC, old_vpid);
-               current->did_exec = 1;
                proc_exec_connector(current);
        }