netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] l2tp: fix namespace support in l2tp_core
@ 2013-02-01  9:42 Tom Parkin
  2013-02-01  9:43 ` [PATCH 1/4] l2tp: put tunnel socket release on a workqueue Tom Parkin
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Tom Parkin @ 2013-02-01  9:42 UTC (permalink / raw)
  To: netdev; +Cc: jchapman, celston, Tom Parkin

As previously reported on netdev, l2tp_core has a number of issues with network 
namespaces which this patchset seeks to address:

	* Create unmanaged tunnel sockets[1] in the namespace passed to
	  l2tp_tunnel_create, rather than defaulting to using the namespace
	  of the current process.

	* Drop namespace references for unmanaged tunnel sockets.  This is to
	  prevent such a socket keeping an otherwise inaccessible namespace
	  alive.  Unmanaged sockets are freed in a namespace net_exit
	  callback.

	* Push tunnel socket release onto a workqueue to allow
	  l2tp_tunnel_delete to be called from an atomic context.  This is to
	  allow the l2tp net_exit callback to walk the tunnel list in an RCU
	  critical section.

There are also minor changes to sanity check namespaces for managed tunnel
sockets, and to flag to netlink that l2tp can run in a namespace other than
default.

Tested on AMD64 and armv6l, under preempt and non-prempt configurations.

[1]. An "unmanaged" tunnel socket is created by the kernel and not exposed to
     userspace.  It is used to perform data encapsulation and de-encapsulation
     at the kernel level without incurring the overhead of the L2TP control
     protocol.  There is code in iproute2 to create unmanaged l2tp tunnels.

Tom Parkin (4):
  l2tp: put tunnel socket release on a workqueue
  l2tp: set netnsok flag for netlink messages
  l2tp: prevent tunnel creation on netns mismatch
  l2tp: create tunnel sockets in the right namespace

 net/l2tp/l2tp_core.c    |  179 +++++++++++++++++++++++++++++------------------
 net/l2tp/l2tp_core.h    |    2 +
 net/l2tp/l2tp_netlink.c |    1 +
 3 files changed, 114 insertions(+), 68 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-05 18:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01  9:42 [PATCH 0/4] l2tp: fix namespace support in l2tp_core Tom Parkin
2013-02-01  9:43 ` [PATCH 1/4] l2tp: put tunnel socket release on a workqueue Tom Parkin
2013-02-01  9:43 ` [PATCH 2/4] l2tp: set netnsok flag for netlink messages Tom Parkin
2013-02-01  9:43 ` [PATCH 3/4] l2tp: prevent tunnel creation on netns mismatch Tom Parkin
2013-02-01  9:43 ` [PATCH 4/4] l2tp: create tunnel sockets in the right namespace Tom Parkin
2013-02-04 18:21 ` [PATCH 0/4] l2tp: fix namespace support in l2tp_core David Miller
2013-02-05  9:27   ` Tom Parkin
2013-02-05 18:56     ` David Miller

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