diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 357d443d5a00..ceffc67b564a 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -83,14 +83,10 @@ static void __exit_signal(struct task_struct *tsk) | |||
83 | struct sighand_struct *sighand; | 83 | struct sighand_struct *sighand; |
84 | struct tty_struct *uninitialized_var(tty); | 84 | struct tty_struct *uninitialized_var(tty); |
85 | 85 | ||
86 | BUG_ON(!sig); | ||
87 | BUG_ON(!atomic_read(&sig->count)); | ||
88 | |||
89 | sighand = rcu_dereference_check(tsk->sighand, | 86 | sighand = rcu_dereference_check(tsk->sighand, |
90 | rcu_read_lock_held() || | 87 | rcu_read_lock_held() || |
91 | lockdep_tasklist_lock_is_held()); | 88 | lockdep_tasklist_lock_is_held()); |
92 | spin_lock(&sighand->siglock); | 89 | spin_lock(&sighand->siglock); |
93 | atomic_dec(&sig->count); | ||
94 | 90 | ||
95 | posix_cpu_timers_exit(tsk); | 91 | posix_cpu_timers_exit(tsk); |
96 | if (group_dead) { | 92 | if (group_dead) { |
@@ -130,6 +126,7 @@ static void __exit_signal(struct task_struct *tsk) | |||
130 | sig->sum_sched_runtime += tsk->se.sum_exec_runtime; | 126 | sig->sum_sched_runtime += tsk->se.sum_exec_runtime; |
131 | } | 127 | } |
132 | 128 | ||
129 | sig->nr_threads--; | ||
133 | __unhash_process(tsk, group_dead); | 130 | __unhash_process(tsk, group_dead); |
134 | 131 | ||
135 | /* | 132 | /* |