Re: [PATCH 2/2] ptrace children revamp

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Roland McGrath <roland@...>
Cc: Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, <linux-kernel@...>
Date: Sunday, April 13, 2008 - 10:24 am

Sorry for delay!

On 04/09, Roland McGrath wrote:

Agreed. I never understood why we need __WNOTHREAD. The same for
->pdeath_signal in its current "per-thread" form. I think it would be
very nice to kill them both (or send the ->pdeath_signal when the whole
process exits). Then we can place all childrens on one signal->children
list. But this is a bit off-topic for now.


I think the 4th patch has a small problem,

	reparent_zombie:

		if (p->exit_signal == -1 ||
		    (thread_group_empty(p) && ignoring_children(p->real_parent)))
			list_add(&p->ptrace_list, dead);

The 2nd case, "thread_group_empty(p) && ignoring_children", looks racy.
We didn't set ->exit_signal == -1, the new parent can call do_wait() and
release "p" as soon as we drop tasklist_lock, before ptrace_exit_finish().


Yes! I thought about this too. Actually, I was very sure that this is your
plan from the the very beginning ;)

Oleg.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] do_wait reorganization, Roland McGrath, (Fri Mar 28, 11:34 pm)
Re: [PATCH 1/2] do_wait reorganization, Linus Torvalds, (Sat Mar 29, 12:16 pm)
[PATCH 1/3] do_wait reorganization, Roland McGrath, (Sun Mar 30, 11:57 pm)
Re: [PATCH 1/3] do_wait reorganization, Oleg Nesterov, (Mon Mar 31, 4:51 am)
Re: [PATCH 1/3] do_wait reorganization, Roland McGrath, (Mon Mar 31, 4:29 pm)
Re: [PATCH 1/3] do_wait reorganization, Oleg Nesterov, (Mon Mar 31, 4:07 pm)
[PATCH 2/3] ptrace children revamp, Roland McGrath, (Sun Mar 30, 11:59 pm)
Re: [PATCH 2/3] ptrace children revamp, Oleg Nesterov, (Mon Mar 31, 5:12 am)
Re: [PATCH 1/2] do_wait reorganization, Roland McGrath, (Sun Mar 30, 11:27 pm)
Re: [PATCH 1/2] do_wait reorganization, Oleg Nesterov, (Sat Mar 29, 6:35 am)
Re: [PATCH 1/2] do_wait reorganization, Roland McGrath, (Sun Mar 30, 11:54 pm)
[PATCH 2/2] ptrace children revamp, Roland McGrath, (Fri Mar 28, 11:35 pm)
Re: [PATCH 2/2] ptrace children revamp, Oleg Nesterov, (Sat Mar 29, 6:39 am)
Re: [PATCH 2/2] ptrace children revamp, Oleg Nesterov, (Sat Mar 29, 9:10 am)
Re: [PATCH 2/2] ptrace children revamp, Roland McGrath, (Fri Apr 4, 5:00 pm)
Re: [PATCH 2/2] ptrace children revamp, Oleg Nesterov, (Sat Apr 5, 10:06 am)
Re: [PATCH 2/2] ptrace children revamp, Roland McGrath, (Wed Apr 9, 4:15 pm)
Re: [PATCH 2/2] ptrace children revamp, Oleg Nesterov, (Sun Apr 13, 10:24 am)
Re: [PATCH 2/2] ptrace children revamp, Roland McGrath, (Mon Apr 14, 9:41 pm)
Re: [PATCH 2/2] ptrace children revamp, Oleg Nesterov, (Sat Mar 29, 10:37 am)