Re: [PATCH] fs, proc: Introduce the /proc/<pid>/children entry v2

From: Cyrill Gorcunov
Date: Fri Dec 09 2011 - 12:11:54 EST


On Fri, Dec 09, 2011 at 05:55:36PM +0100, Oleg Nesterov wrote:
...
>
> To simplify, let's talk about children_seq_start() your patch adds.
> Suppose that we make ->children/sibling "rcu-safe" (we replace
> __unhash_process()->list_del_init() with list_del_rcu, and so on).
>
> Now, children_seq_start() does:
>
> rcu_read_lock();
>
> list_for_each(child, task->children)
> ...;
>
> Suppose that this task exits and reparents the child we are looking at.
> Once reparent_leader() moves it into another list, list_for_each()
> can never stop.
>
> In short. forget_original_parent() changes the _head_ of the list,
> in some sense.
>

Yeah, I missed this, my bad! Thanks for explanation, Oleg. I'll
post updated version once I finish it.

Cyrill
--
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/