2007-08-05 14:58:36

by Oleg Nesterov

[permalink] [raw]
Subject: [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check

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 <[email protected]>

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



2007-08-05 20:52:25

by Roland McGrath

[permalink] [raw]
Subject: Re: [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check

> 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

2007-08-05 21:09:18

by Oleg Nesterov

[permalink] [raw]
Subject: Re: [PATCH 1/2] wait_task_zombie: remove unneeded child->signal check

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.