From: Max Krasnyanskiy <maxk@qualcomm.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: David Miller <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>,
devel@openvz.org
Subject: Re: [PATCH net-2.6.26 3/3][TUN][NETNS]: Allow to register tun devices in namespace.
Date: Wed, 02 Apr 2008 15:54:29 -0700 [thread overview]
Message-ID: <47F40EA5.1030705@qualcomm.com> (raw)
In-Reply-To: <47F391BE.20008@openvz.org>
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
next prev parent reply other threads:[~2008-04-02 22:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 14:01 [PATCH net-2.6.26 3/3][TUN][NETNS]: Allow to register tun devices in namespace Pavel Emelyanov
2008-04-02 22:54 ` Max Krasnyanskiy [this message]
2008-04-03 12:34 ` Pavel Emelyanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F40EA5.1030705@qualcomm.com \
--to=maxk@qualcomm.com \
--cc=davem@davemloft.net \
--cc=devel@openvz.org \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).