l2tp: avoid using ->tunnel_sock for getting session's parent tunnel
authorGuillaume Nault <g.nault@alphalink.fr>
Fri, 10 Nov 2017 21:06:31 +0000 (06:06 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Nov 2017 13:08:23 +0000 (22:08 +0900)
commit7198c77aa05560c257ee377ec1f4796812121580
treebf7902522bdec64433afc2984fa19b5789223274
parent8fdfd6595bd739d8338fd1f3d553a9a34ed9824c
l2tp: avoid using ->tunnel_sock for getting session's parent tunnel

Sessions don't need to use l2tp_sock_to_tunnel(xxx->tunnel_sock) for
accessing their parent tunnel. They have the .tunnel field in the
l2tp_session structure for that. Furthermore, in all these cases, the
session is registered, so we're guaranteed that .tunnel isn't NULL and
that the session properly holds a reference on the tunnel.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_ppp.c