aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 03b907cfd765..9c73def87642 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -932,6 +932,7 @@ static int de_thread(struct task_struct *tsk)
932 * also take its birthdate (always earlier than our own). 932 * also take its birthdate (always earlier than our own).
933 */ 933 */
934 tsk->start_time = leader->start_time; 934 tsk->start_time = leader->start_time;
935 tsk->real_start_time = leader->real_start_time;
935 936
936 BUG_ON(!same_thread_group(leader, tsk)); 937 BUG_ON(!same_thread_group(leader, tsk));
937 BUG_ON(has_group_leader_pid(tsk)); 938 BUG_ON(has_group_leader_pid(tsk));
@@ -947,9 +948,8 @@ static int de_thread(struct task_struct *tsk)
947 * Note: The old leader also uses this pid until release_task 948 * Note: The old leader also uses this pid until release_task
948 * is called. Odd but simple and correct. 949 * is called. Odd but simple and correct.
949 */ 950 */
950 detach_pid(tsk, PIDTYPE_PID);
951 tsk->pid = leader->pid; 951 tsk->pid = leader->pid;
952 attach_pid(tsk, PIDTYPE_PID, task_pid(leader)); 952 change_pid(tsk, PIDTYPE_PID, task_pid(leader));
953 transfer_pid(leader, tsk, PIDTYPE_PGID); 953 transfer_pid(leader, tsk, PIDTYPE_PGID);
954 transfer_pid(leader, tsk, PIDTYPE_SID); 954 transfer_pid(leader, tsk, PIDTYPE_SID);
955 955
@@ -1465,7 +1465,6 @@ static int do_execve_common(const char *filename,
1465 struct files_struct *displaced; 1465 struct files_struct *displaced;
1466 bool clear_in_exec; 1466 bool clear_in_exec;
1467 int retval; 1467 int retval;
1468 const struct cred *cred = current_cred();
1469 1468
1470 /* 1469 /*
1471 * We move the actual failure in case of RLIMIT_NPROC excess from 1470 * We move the actual failure in case of RLIMIT_NPROC excess from
@@ -1474,7 +1473,7 @@ static int do_execve_common(const char *filename,
1474 * whether NPROC limit is still exceeded. 1473 * whether NPROC limit is still exceeded.
1475 */ 1474 */
1476 if ((current->flags & PF_NPROC_EXCEEDED) && 1475 if ((current->flags & PF_NPROC_EXCEEDED) &&
1477 atomic_read(&cred->user->processes) > rlimit(RLIMIT_NPROC)) { 1476 atomic_read(&current_user()->processes) > rlimit(RLIMIT_NPROC)) {
1478 retval = -EAGAIN; 1477 retval = -EAGAIN;
1479 goto out_ret; 1478 goto out_ret;
1480 } 1479 }