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/5] l2tp: fix some l2tp_tunnel_find() issues in l2tp_netlink
Date: Fri, 25 Aug 2017 16:51:39 +0200	[thread overview]
Message-ID: <cover.1503671776.git.g.nault@alphalink.fr> (raw)

Since l2tp_tunnel_find() doesn't take a reference on the tunnel it
returns, its users are almost guaranteed to be racy.

This series defines l2tp_tunnel_get() which can be used as a safe
replacement, and converts some of l2tp_tunnel_find() users in the
l2tp_netlink module.

Other users often combine this issue with other more or less subtle
races. They will be fixed incrementally in followup series.

Guillaume Nault (5):
  l2tp: hold tunnel while looking up sessions in l2tp_netlink
  l2tp: hold tunnel while processing genl delete command
  l2tp: hold tunnel while handling genl tunnel updates
  l2tp: hold tunnel while handling genl TUNNEL_GET commands
  l2tp: hold tunnel used while creating sessions with netlink

 net/l2tp/l2tp_core.c    | 66 ++++++++++++++++---------------------------------
 net/l2tp/l2tp_core.h    | 13 ++++++++++
 net/l2tp/l2tp_netlink.c | 66 +++++++++++++++++++++++++++++--------------------
 3 files changed, 73 insertions(+), 72 deletions(-)

-- 
2.14.1

             reply	other threads:[~2017-08-25 14:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 14:51 Guillaume Nault [this message]
2017-08-25 14:51 ` [PATCH net 1/5] l2tp: hold tunnel while looking up sessions in l2tp_netlink Guillaume Nault
2017-08-25 14:51 ` [PATCH net 3/5] l2tp: hold tunnel while handling genl tunnel updates Guillaume Nault
2017-08-25 14:51 ` [PATCH net 2/5] l2tp: hold tunnel while processing genl delete command Guillaume Nault
2017-08-25 14:51 ` [PATCH net 4/5] l2tp: hold tunnel while handling genl TUNNEL_GET commands Guillaume Nault
2017-08-25 14:51 ` [PATCH net 5/5] l2tp: hold tunnel used while creating sessions with netlink Guillaume Nault
2017-08-28 18:35 ` [PATCH net 0/5] l2tp: fix some l2tp_tunnel_find() issues in l2tp_netlink David Miller

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