aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/fs/exec.c b/fs/exec.c
index be923e4bc389..927a7c5ef4af 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -782,26 +782,8 @@ static int de_thread(struct task_struct *tsk)
782 zap_other_threads(tsk); 782 zap_other_threads(tsk);
783 read_unlock(&tasklist_lock); 783 read_unlock(&tasklist_lock);
784 784
785 /* 785 /* Account for the thread group leader hanging around: */
786 * Account for the thread group leader hanging around: 786 count = thread_group_leader(tsk) ? 1 : 2;
787 */
788 count = 1;
789 if (!thread_group_leader(tsk)) {
790 count = 2;
791 /*
792 * The SIGALRM timer survives the exec, but needs to point
793 * at us as the new group leader now. We have a race with
794 * a timer firing now getting the old leader, so we need to
795 * synchronize with any firing (by calling del_timer_sync)
796 * before we can safely let the old group leader die.
797 */
798 sig->tsk = tsk;
799 spin_unlock_irq(lock);
800 if (hrtimer_cancel(&sig->real_timer))
801 hrtimer_restart(&sig->real_timer);
802 spin_lock_irq(lock);
803 }
804
805 sig->notify_count = count; 787 sig->notify_count = count;
806 while (atomic_read(&sig->count) > count) { 788 while (atomic_read(&sig->count) > count) {
807 __set_current_state(TASK_UNINTERRUPTIBLE); 789 __set_current_state(TASK_UNINTERRUPTIBLE);