aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 6d5dbb7a13e2..4854c2c4a82e 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -851,13 +851,14 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
851 sig->tty_old_pgrp = NULL; 851 sig->tty_old_pgrp = NULL;
852 sig->tty = NULL; 852 sig->tty = NULL;
853 853
854 sig->cutime = sig->cstime = cputime_zero; 854 sig->utime = sig->stime = sig->cutime = sig->cstime = cputime_zero;
855 sig->gtime = cputime_zero; 855 sig->gtime = cputime_zero;
856 sig->cgtime = cputime_zero; 856 sig->cgtime = cputime_zero;
857 sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0; 857 sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0;
858 sig->min_flt = sig->maj_flt = sig->cmin_flt = sig->cmaj_flt = 0; 858 sig->min_flt = sig->maj_flt = sig->cmin_flt = sig->cmaj_flt = 0;
859 sig->inblock = sig->oublock = sig->cinblock = sig->coublock = 0; 859 sig->inblock = sig->oublock = sig->cinblock = sig->coublock = 0;
860 task_io_accounting_init(&sig->ioac); 860 task_io_accounting_init(&sig->ioac);
861 sig->sum_sched_runtime = 0;
861 taskstats_tgid_init(sig); 862 taskstats_tgid_init(sig);
862 863
863 task_lock(current->group_leader); 864 task_lock(current->group_leader);
@@ -1094,7 +1095,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1094#ifdef CONFIG_DEBUG_MUTEXES 1095#ifdef CONFIG_DEBUG_MUTEXES
1095 p->blocked_on = NULL; /* not blocked yet */ 1096 p->blocked_on = NULL; /* not blocked yet */
1096#endif 1097#endif
1097 if (unlikely(ptrace_reparented(current))) 1098 if (unlikely(current->ptrace))
1098 ptrace_fork(p, clone_flags); 1099 ptrace_fork(p, clone_flags);
1099 1100
1100 /* Perform scheduler related setup. Assign this task to a CPU. */ 1101 /* Perform scheduler related setup. Assign this task to a CPU. */
@@ -1178,10 +1179,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1178#endif 1179#endif
1179 clear_all_latency_tracing(p); 1180 clear_all_latency_tracing(p);
1180 1181
1181 /* Our parent execution domain becomes current domain
1182 These must match for thread signalling to apply */
1183 p->parent_exec_id = p->self_exec_id;
1184
1185 /* ok, now we should be set up.. */ 1182 /* ok, now we should be set up.. */
1186 p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL); 1183 p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL);
1187 p->pdeath_signal = 0; 1184 p->pdeath_signal = 0;
@@ -1219,10 +1216,13 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1219 set_task_cpu(p, smp_processor_id()); 1216 set_task_cpu(p, smp_processor_id());
1220 1217
1221 /* CLONE_PARENT re-uses the old parent */ 1218 /* CLONE_PARENT re-uses the old parent */
1222 if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) 1219 if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) {
1223 p->real_parent = current->real_parent; 1220 p->real_parent = current->real_parent;
1224 else 1221 p->parent_exec_id = current->parent_exec_id;
1222 } else {
1225 p->real_parent = current; 1223 p->real_parent = current;
1224 p->parent_exec_id = current->self_exec_id;
1225 }
1226 1226
1227 spin_lock(&current->sighand->siglock); 1227 spin_lock(&current->sighand->siglock);
1228 1228