On 02/22, Oleg Nesterov wrote: > > Pavel, > > Your patch doesn't apply to Linus's tree. > > and in any case... can you avoid read_lock(tasklist) in alloc_pid() ? > This is really not good.
I'm afraid I am totally confused, but it looks unnecessary. Once ->child_reaper is set, it can be changed but not cleared. This means that pidns_for_children_get() doesn't need tasklist too. However. With or without this patch, we probably need WRITE_ONCE() in find_child_reaper() and copy_process() + READ_ONCE() in alloc_pid() to avoid the possible warnings from KCSAN. No? Oleg.

