aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/l2tp
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-08-05 13:04:31 -0700
committerDavid S. Miller <davem@davemloft.net>2018-08-05 13:04:31 -0700
commitc1c8626fcebed467184ffd8de0ab5c9f9d9c3594 (patch)
tree2c661fee934f4a7985e4f8e29cd1ba63a330a5e4 /net/l2tp
parentethtool: Remove trailing semicolon for static inline (diff)
parentLinux 4.18-rc8 (diff)
downloadwireguard-linux-c1c8626fcebed467184ffd8de0ab5c9f9d9c3594.tar.xz
wireguard-linux-c1c8626fcebed467184ffd8de0ab5c9f9d9c3594.zip
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Lots of overlapping changes, mostly trivial in nature. The mlxsw conflict was resolving using the example resolution at: https://github.com/jpirko/linux_mlxsw/blob/combined_queue/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_ppp.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index b403728e2757..6e2c8e7595e0 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1139,13 +1139,18 @@ static int pppol2tp_tunnel_ioctl(struct l2tp_tunnel *tunnel,
l2tp_session_get(sock_net(sk), tunnel,
stats.session_id);
- if (session && session->pwtype == L2TP_PWTYPE_PPP) {
- err = pppol2tp_session_ioctl(session, cmd,
- arg);
+ if (!session) {
+ err = -EBADR;
+ break;
+ }
+ if (session->pwtype != L2TP_PWTYPE_PPP) {
l2tp_session_dec_refcount(session);
- } else {
err = -EBADR;
+ break;
}
+
+ err = pppol2tp_session_ioctl(session, cmd, arg);
+ l2tp_session_dec_refcount(session);
break;
}
#ifdef CONFIG_XFRM