On 2/22/26 17:55, Oleg Nesterov wrote:
> 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.

Yes.

> This means that pidns_for_children_get() doesn't need tasklist too.

I originally thought that, maybe, something around first setting of
->child_reaper had to be observed together with child_reaper change.
But yes, I looked into the code around it and failed to identify
something like that.

> 
> 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.

OK, I will add this, sounds like a good idea. Thanks!

> 
> No?
> 
> Oleg.
> 

-- 
Best regards, Pavel Tikhomirov
Senior Software Developer, Virtuozzo.


Reply via email to