From: Oleg Nesterov Date: Sat, 29 Oct 2005 15:37:40 +0000 (+0400) Subject: [PATCH] fix ->signal->live leak in copy_process() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8d027de54c77d38eedc9b331c7a2a39807d34691;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] fix ->signal->live leak in copy_process() 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 Signed-off-by: Linus Torvalds --- diff --git a/kernel/signal.c b/kernel/signal.c index f2b96b08fb4..6904bbbfe11 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -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);