diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 9220967f4256..4c70c377d21f 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -88,11 +88,12 @@ static void __exit_signal(struct task_struct *tsk) | |||
88 | rcu_read_lock_held() || | 88 | rcu_read_lock_held() || |
89 | lockdep_tasklist_lock_is_held()); | 89 | lockdep_tasklist_lock_is_held()); |
90 | spin_lock(&sighand->siglock); | 90 | spin_lock(&sighand->siglock); |
91 | atomic_dec(&sig->count); | ||
91 | 92 | ||
92 | posix_cpu_timers_exit(tsk); | 93 | posix_cpu_timers_exit(tsk); |
93 | if (atomic_dec_and_test(&sig->count)) | 94 | if (thread_group_leader(tsk)) { |
94 | posix_cpu_timers_exit_group(tsk); | 95 | posix_cpu_timers_exit_group(tsk); |
95 | else { | 96 | } else { |
96 | /* | 97 | /* |
97 | * If there is any task waiting for the group exit | 98 | * If there is any task waiting for the group exit |
98 | * then notify it: | 99 | * then notify it: |