netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guillaume Nault <g.nault@alphalink.fr>
To: netdev@vger.kernel.org
Cc: James Chapman <jchapman@katalix.com>
Subject: [PATCH net 0/3] l2tp: remove unsafe calls to l2tp_tunnel_find_nth()
Date: Thu, 12 Apr 2018 20:50:32 +0200	[thread overview]
Message-ID: <cover.1523558015.git.g.nault@alphalink.fr> (raw)

Using l2tp_tunnel_find_nth() is racy, because the returned tunnel can
go away as soon as this function returns. This series introduce
l2tp_tunnel_get_nth() as a safe replacement to fixes these races.

With this series, all unsafe tunnel/session lookups are finally gone.

Guillaume Nault (3):
  l2tp: hold reference on tunnels in netlink dumps
  l2tp: hold reference on tunnels printed in pppol2tp proc file
  l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs file

 net/l2tp/l2tp_core.c    | 40 ++++++++++++++++++++--------------------
 net/l2tp/l2tp_core.h    |  3 ++-
 net/l2tp/l2tp_debugfs.c | 15 +++++++++++++--
 net/l2tp/l2tp_netlink.c | 11 ++++++++---
 net/l2tp/l2tp_ppp.c     | 24 +++++++++++++++++-------
 5 files changed, 60 insertions(+), 33 deletions(-)

-- 
2.17.0

             reply	other threads:[~2018-04-12 18:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 18:50 Guillaume Nault [this message]
2018-04-12 18:50 ` [PATCH net 1/3] l2tp: hold reference on tunnels in netlink dumps Guillaume Nault
2018-04-13 14:57   ` David Miller
2018-04-13 16:09     ` Guillaume Nault
2018-04-13 16:15       ` David Miller
2018-04-12 18:50 ` [PATCH net 2/3] l2tp: hold reference on tunnels printed in pppol2tp proc file Guillaume Nault
2018-04-12 18:50 ` [PATCH net 3/3] l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs file Guillaume Nault

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=cover.1523558015.git.g.nault@alphalink.fr \
    --to=g.nault@alphalink.fr \
    --cc=jchapman@katalix.com \
    --cc=netdev@vger.kernel.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).