[patch 08/11] - fix signal->live leak in copy_process()

From: Greg KH
Date: Wed Nov 09 2005 - 13:39:17 EST


From: Oleg Nesterov <oleg@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
kernel/signal.c | 2 ++
1 file changed, 2 insertions(+)

--- linux-2.6.14.1.orig/kernel/signal.c
+++ linux-2.6.14.1/kernel/signal.c
@@ -406,6 +406,8 @@ void __exit_signal(struct task_struct *t

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);

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/