Re: [PATCH v3 3/4] pid_namespace: allow opening pid_for_children before init was created

From: Oleg Nesterov

Date: Wed Feb 25 2026 - 07:56:12 EST


On 02/24, Pavel Tikhomirov wrote:
>
> Note: I didn't find anything in copy_process() around setting the
> ->child_reaper which can influence the pid namespace, so it looks like
> the pid namespace is fully setup at the point when init sets
> ->child_reaper to receive more processes. Thus tasklist lock looks
> excess in pidns_for_children_get()'s ->child_reaper check and it should
> be safe not to have it in the corresponding check in alloc_pid()
> (introduced earlier in this series).

I think you are right.

Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>