OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] Make access to taks's nsproxy liter
Re: [RFC][PATCH] Make access to taks's nsproxy liter [message #19680 is a reply to message #19663] Thu, 09 August 2007 08:17 Go to previous messageGo to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Eric W. Biederman wrote:
> Pavel Emelyanov <xemul@openvz.org> writes:
> 
>> Eric W. Biederman wrote:
>>> Pavel Emelyanov <xemul@openvz.org> writes:
>>>
>>>> When someone wants to deal with some other taks's namespaces
>>>> it has to lock the task and then to get the desired namespace
>>>> if the one exists. This is slow on read-only paths and may be
>>>> impossible in some cases.
>>>>
>>>> E.g. Oleg recently noticed a race between unshare() and the
>>>> (just sent for review) pid namespaces - when the task notifies
>>>> the parent it has to know the parent's namespace, but taking
>>>> the task_lock() is impossible there - the code is under write
>>>> locked tasklist lock.
>>>>
>>>> On the other hand switching the namespace on task (daemonize)
>>>> and releasing the namespace (after the last task exit) is rather
>>>> rare operation and we can sacrifice its speed to solve the
>>>> issues above.
>>>
>>> Looks pretty decent but we need to clearly say what lock
>>> you have to have to assign to the nsproxy pointer.
>> no locks - only current is allowed to change its nsproxy!
> 
> Exactly.  Just need a comment or something to make that clear.

Oh! Ok, I will add it. Thanks.

> Eric
> 

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [RFC][PATCH] Make access to taks's nsproxy liter
Next Topic: [PATCH] Remove CTL_UNNUMBERED
Goto Forum:
  


Current Time: Thu Aug 21 06:55:10 GMT 2025

Total time taken to generate the page: 0.06719 seconds