Messages in this thread | | | Date | Fri, 9 Dec 2011 21:11:49 +0400 | From | Cyrill Gorcunov <> | Subject | Re: [PATCH] fs, proc: Introduce the /proc/<pid>/children entry v2 |
| |
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
| |