OpenVZ Forum


Home » Mailing lists » Devel » [PATCH net-2.6.26 3/3][TUN][NETNS]: Allow to register tun devices in namespace.
Re: [PATCH net-2.6.26 3/3][TUN][NETNS]: Allow to register tun devices in namespace. [message #29242 is a reply to message #28960] Wed, 02 April 2008 22:54 Go to previous message
Max Krasnyanskiy is currently offline  Max Krasnyanskiy
Messages: 3
Registered: April 2008
Junior Member
Hi Pavel,

All three patches look perfectly fine to me.
Feel free to add Acked-by: Max Krasnyansky <maxk@qualcomm.com>

Pavel Emelyanov wrote:
> This is basically means that a net is set for a new device, but
> actually this involves two more steps:
> 
> 1. mark the tun device as "local", i.e. do not allow for it to
>    move across namespaces.
> 
> This is done so, since tun device is most often associated to some
> file (and thus to some process) and moving the device alone is not
> valid while keeping the file and the process outside.
> 
> 2. get the tun device's net when tun becomes attached and put one
>    when it becomes detached.
> 
> This is needed to handle the case when a task owning the tun dies,
> but a files lives for some more time - in this case we must not
> allow for net to be freed, since its exit hook will spoil that file's
> private data by unregistering the tun from under tun_chr_close.
I'm not sure what you mean "by file lives on" here. I believe you're talking 
about persistent tun devices. ie Those that exist in detached state and are 
not attached to any file descriptors.
"net" refcounting logic there looks fine to me.

Max
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH 2/2] Make res_counter hierarchical
Next Topic: [PATCH -mm 2/3] cgroup: simplify init_subsys()
Goto Forum:
  


Current Time: Fri Jul 19 22:26:42 GMT 2024

Total time taken to generate the page: 0.02273 seconds