Skip to content

Commit

Permalink
[PATCH] fix ->signal->live leak in copy_process()
Browse files Browse the repository at this point in the history
exit_signal() (called from copy_process's error path) should decrement
->signal->live, otherwise forking process will miss 'group_dead' in
do_exit().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Oct 29, 2005
1 parent 47e627c commit 8d027de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ void __exit_signal(struct task_struct *tsk)

void exit_signal(struct task_struct *tsk)
{
atomic_dec(&tsk->signal->live);

write_lock_irq(&tasklist_lock);
__exit_signal(tsk);
write_unlock_irq(&tasklist_lock);
Expand Down

0 comments on commit 8d027de

Please sign in to comment.