aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 73affd35e76d..f9dfedd94af0 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -178,12 +178,6 @@ repeat:
178 178
179 proc_flush_task(p); 179 proc_flush_task(p);
180 180
181 /*
182 * Flush inherited counters to the parent - before the parent
183 * gets woken up by child-exit notifications.
184 */
185 perf_counter_exit_task(p);
186
187 write_lock_irq(&tasklist_lock); 181 write_lock_irq(&tasklist_lock);
188 tracehook_finish_release_task(p); 182 tracehook_finish_release_task(p);
189 __exit_signal(p); 183 __exit_signal(p);
@@ -985,6 +979,13 @@ NORET_TYPE void do_exit(long code)
985 module_put(tsk->binfmt->module); 979 module_put(tsk->binfmt->module);
986 980
987 proc_exit_connector(tsk); 981 proc_exit_connector(tsk);
982
983 /*
984 * Flush inherited counters to the parent - before the parent
985 * gets woken up by child-exit notifications.
986 */
987 perf_counter_exit_task(tsk);
988
988 exit_notify(tsk, group_dead); 989 exit_notify(tsk, group_dead);
989#ifdef CONFIG_NUMA 990#ifdef CONFIG_NUMA
990 mpol_put(tsk->mempolicy); 991 mpol_put(tsk->mempolicy);
@@ -1257,12 +1258,6 @@ static int wait_task_zombie(struct task_struct *p, int options,
1257 */ 1258 */
1258 read_unlock(&tasklist_lock); 1259 read_unlock(&tasklist_lock);
1259 1260
1260 /*
1261 * Flush inherited counters to the parent - before the parent
1262 * gets woken up by child-exit notifications.
1263 */
1264 perf_counter_exit_task(p);
1265
1266 retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; 1261 retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0;
1267 status = (p->signal->flags & SIGNAL_GROUP_EXIT) 1262 status = (p->signal->flags & SIGNAL_GROUP_EXIT)
1268 ? p->signal->group_exit_code : p->exit_code; 1263 ? p->signal->group_exit_code : p->exit_code;