aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 1f59ea079cbb..02d2e120542d 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -773,7 +773,6 @@ static int de_thread(struct task_struct *tsk)
773 struct signal_struct *sig = tsk->signal; 773 struct signal_struct *sig = tsk->signal;
774 struct sighand_struct *oldsighand = tsk->sighand; 774 struct sighand_struct *oldsighand = tsk->sighand;
775 spinlock_t *lock = &oldsighand->siglock; 775 spinlock_t *lock = &oldsighand->siglock;
776 struct task_struct *leader = NULL;
777 int count; 776 int count;
778 777
779 if (thread_group_empty(tsk)) 778 if (thread_group_empty(tsk))
@@ -811,7 +810,7 @@ static int de_thread(struct task_struct *tsk)
811 * and to assume its PID: 810 * and to assume its PID:
812 */ 811 */
813 if (!thread_group_leader(tsk)) { 812 if (!thread_group_leader(tsk)) {
814 leader = tsk->group_leader; 813 struct task_struct *leader = tsk->group_leader;
815 814
816 sig->notify_count = -1; /* for exit_notify() */ 815 sig->notify_count = -1; /* for exit_notify() */
817 for (;;) { 816 for (;;) {
@@ -863,8 +862,9 @@ static int de_thread(struct task_struct *tsk)
863 862
864 BUG_ON(leader->exit_state != EXIT_ZOMBIE); 863 BUG_ON(leader->exit_state != EXIT_ZOMBIE);
865 leader->exit_state = EXIT_DEAD; 864 leader->exit_state = EXIT_DEAD;
866
867 write_unlock_irq(&tasklist_lock); 865 write_unlock_irq(&tasklist_lock);
866
867 release_task(leader);
868 } 868 }
869 869
870 sig->group_exit_task = NULL; 870 sig->group_exit_task = NULL;
@@ -873,8 +873,6 @@ static int de_thread(struct task_struct *tsk)
873no_thread_group: 873no_thread_group:
874 exit_itimers(sig); 874 exit_itimers(sig);
875 flush_itimer_signals(); 875 flush_itimer_signals();
876 if (leader)
877 release_task(leader);
878 876
879 if (atomic_read(&oldsighand->count) != 1) { 877 if (atomic_read(&oldsighand->count) != 1) {
880 struct sighand_struct *newsighand; 878 struct sighand_struct *newsighand;