aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/exit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 41c1edace97a..cd20bf07e9e3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -750,7 +750,7 @@ static void forget_original_parent(struct task_struct *father)
750 * Send signals to all our closest relatives so that they know 750 * Send signals to all our closest relatives so that they know
751 * to properly mourn us.. 751 * to properly mourn us..
752 */ 752 */
753static void exit_notify(struct task_struct *tsk) 753static void exit_notify(struct task_struct *tsk, int group_dead)
754{ 754{
755 int state; 755 int state;
756 756
@@ -766,7 +766,8 @@ static void exit_notify(struct task_struct *tsk)
766 exit_task_namespaces(tsk); 766 exit_task_namespaces(tsk);
767 767
768 write_lock_irq(&tasklist_lock); 768 write_lock_irq(&tasklist_lock);
769 kill_orphaned_pgrp(tsk, NULL); 769 if (group_dead)
770 kill_orphaned_pgrp(tsk->group_leader, NULL);
770 771
771 /* Let father know we died 772 /* Let father know we died
772 * 773 *
@@ -981,7 +982,7 @@ NORET_TYPE void do_exit(long code)
981 module_put(tsk->binfmt->module); 982 module_put(tsk->binfmt->module);
982 983
983 proc_exit_connector(tsk); 984 proc_exit_connector(tsk);
984 exit_notify(tsk); 985 exit_notify(tsk, group_dead);
985#ifdef CONFIG_NUMA 986#ifdef CONFIG_NUMA
986 mpol_free(tsk->mempolicy); 987 mpol_free(tsk->mempolicy);
987 tsk->mempolicy = NULL; 988 tsk->mempolicy = NULL;