lkml.org 
[lkml]   [2011]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-12-09 18:15    [W:0.052 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site