[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120312.171411.899890153797891857.davem@davemloft.net>
Date: Mon, 12 Mar 2012 17:14:11 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: skinsbursky@...allels.com
Cc: xemul@...allels.com, ebiederm@...stanetworks.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
shemminger@...tta.com, devel@...nvz.org
Subject: Re: [PATCH v3] tun: don't hold network namespace by tun sockets
aFrom: Stanislav Kinsbursky <skinsbursky@...allels.com>
Date: Mon, 12 Mar 2012 16:59:41 +0400
> v3: added previously removed sock_put() to the tun_release() callback, because
> sk_release_kernel() doesn't drop the socket reference.
>
> v2: sk_release_kernel() used for socket release. Dummy tun_release() is
> required for sk_release_kernel() ---> sock_release() ---> sock->ops->release()
> call.
>
> TUN was designed to destroy it's socket on network namesapce shutdown. But this
> will never happen for persistent device, because it's socket holds network
> namespace.
> This patch removes of holding network namespace by TUN socket and replaces it
> by creating socket in init_net and then changing it's net it to desired one. On
> shutdown socket is moved back to init_net prior to final put.
>
> Signed-off-by: Stanislav Kinsbursky <skinsbursky@...allels.com>
Looks good, applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists