diff options
author | David S. Miller <davem@davemloft.net> | 2017-04-15 21:16:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-15 21:16:30 -0400 |
commit | 6b6cbc1471676402565e958674523d06213b82d7 (patch) | |
tree | a66d41d276e5eb400e27641f24f34032fe1b9275 /net/l2tp | |
parent | ce07183282975026716107d36fd3f5f93de76668 (diff) | |
parent | 1bf4b1268e66d9364fc6fd41f906bc01458530ac (diff) | |
download | linux-stable-6b6cbc1471676402565e958674523d06213b82d7.tar.gz linux-stable-6b6cbc1471676402565e958674523d06213b82d7.tar.bz2 linux-stable-6b6cbc1471676402565e958674523d06213b82d7.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts were simply overlapping changes. In the net/ipv4/route.c
case the code had simply moved around a little bit and the same fix
was made in both 'net' and 'net-next'.
In the net/sched/sch_generic.c case a fix in 'net' happened at
the same time that a new argument was added to qdisc_hash_add().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r-- | net/l2tp/l2tp_ppp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index 861b255a2d51..32ea0f3d868c 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c @@ -1383,8 +1383,6 @@ static int pppol2tp_setsockopt(struct socket *sock, int level, int optname, } else err = pppol2tp_session_setsockopt(sk, session, optname, val); - err = 0; - end_put_sess: sock_put(sk); end: @@ -1507,8 +1505,13 @@ static int pppol2tp_getsockopt(struct socket *sock, int level, int optname, err = pppol2tp_tunnel_getsockopt(sk, tunnel, optname, &val); sock_put(ps->tunnel_sock); - } else + if (err) + goto end_put_sess; + } else { err = pppol2tp_session_getsockopt(sk, session, optname, &val); + if (err) + goto end_put_sess; + } err = -EFAULT; if (put_user(len, optlen)) |