LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check
@ 2007-08-05 15:00 Oleg Nesterov
  2007-08-05 20:51 ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2007-08-05 15:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ingo Molnar, Roland McGrath, linux-kernel

A zombie must have a valid ->signal, we are going to release it and
__exit_signal() starts with BUG_ON(!sig).

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- t/kernel/exit.c~1_SIGCK	2007-08-05 18:43:00.000000000 +0400
+++ t/kernel/exit.c	2007-08-05 18:46:00.000000000 +0400
@@ -1210,7 +1210,7 @@ static int wait_task_zombie(struct task_
 		return 0;
 	}
 
-	if (likely(p->real_parent == p->parent) && likely(p->signal)) {
+	if (likely(p->real_parent == p->parent)) {
 		struct signal_struct *psig;
 		struct signal_struct *sig;
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check
  2007-08-05 15:00 [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check Oleg Nesterov
@ 2007-08-05 20:51 ` Roland McGrath
  2007-08-05 21:09   ` Oleg Nesterov
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2007-08-05 20:51 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Andrew Morton, Ingo Molnar, linux-kernel

> A zombie must have a valid ->signal, we are going to release it and
> __exit_signal() starts with BUG_ON(!sig).

Yes, this is safe because it's after the EXIT_DEAD check under tasklist_lock.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check
  2007-08-05 20:51 ` Roland McGrath
@ 2007-08-05 21:09   ` Oleg Nesterov
  0 siblings, 0 replies; 3+ messages in thread
From: Oleg Nesterov @ 2007-08-05 21:09 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Andrew Morton, Ingo Molnar, linux-kernel

On 08/05, Roland McGrath wrote:
>
> > A zombie must have a valid ->signal, we are going to release it and
> > __exit_signal() starts with BUG_ON(!sig).
> 
> Yes, this is safe because it's after the EXIT_DEAD check under tasklist_lock.

Yes thanks, the changelog could be better.

We "own" this child (it was us sho set EXIT_DEAD), nobody can release it
including the child itself (it already passed exit_notify()). We could even
drop tasklist, but we need ->parent->sighand->siglock.

Oleg.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-05 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-05 15:00 [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check Oleg Nesterov
2007-08-05 20:51 ` Roland McGrath
2007-08-05 21:09   ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).