Skip to content

l2tp: tunnel creation fixes

Guillaume Nault netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2l2tp: fix races in tunnel creationnet/l2tp/l2tp_core.c net/l2tp/l2tp_core.h net/l2tp/l2tp_netlink.c +1 more+110 -1100 replies
2/2l2tp: fix race in duplicate tunnel detectionnet/l2tp/l2tp_core.c net/l2tp/l2tp_core.h net/l2tp/l2tp_netlink.c+14 -280 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/2] l2tp: tunnel creation fixes

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(-)
Signature · 1 line
2.17.0