netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] l2tp: tunnel creation fixes
@ 2018-04-10 19:01 Guillaume Nault
  2018-04-10 19:01 ` [PATCH net 1/2] l2tp: fix races in tunnel creation Guillaume Nault
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guillaume Nault @ 2018-04-10 19:01 UTC (permalink / raw)
  To: netdev; +Cc: James Chapman, Tom Parkin

L2TP tunnel creation is racy. We need to make sure that the tunnel
returned by l2tp_tunnel_create() isn't going to be freed while the
caller is using it. This is done in patch #1, by separating tunnel
creation from tunnel registration.

With the tunnel registration code in place, we can now check for
duplicate tunnels in a race-free way. This is done in patch #2, which
incidentally removes the last use of l2tp_tunnel_find().

Guillaume Nault (2):
  l2tp: fix races in tunnel creation
  l2tp: fix race in duplicate tunnel detection

 net/l2tp/l2tp_core.c    | 225 +++++++++++++++++-----------------------
 net/l2tp/l2tp_core.h    |   4 +-
 net/l2tp/l2tp_netlink.c |  22 ++--
 net/l2tp/l2tp_ppp.c     |   9 ++
 4 files changed, 123 insertions(+), 137 deletions(-)

-- 
2.17.0

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

end of thread, other threads:[~2018-04-11 21:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-10 19:01 [PATCH net 0/2] l2tp: tunnel creation fixes Guillaume Nault
2018-04-10 19:01 ` [PATCH net 1/2] l2tp: fix races in tunnel creation Guillaume Nault
2018-04-10 19:01 ` [PATCH net 2/2] l2tp: fix race in duplicate tunnel detection Guillaume Nault
2018-04-11 21:42 ` [PATCH net 0/2] l2tp: tunnel creation fixes 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).