l2tp: hold tunnel in pppol2tp_connect()
authorGuillaume Nault <g.nault@alphalink.fr>
Mon, 30 Oct 2017 16:58:58 +0000 (17:58 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 1 Jan 2018 20:51:00 +0000 (20:51 +0000)
commit12945a46acaa55195996eea82c762d6ba2fe002a
tree3a90928129db8c8c6085af2f0ff17e4c8528f404
parentcf651e67b5d9fdafc167872bf0544eaeb38f2f2b
l2tp: hold tunnel in pppol2tp_connect()

commit f9e56baf03f9d36043a78f16e3e8b2cfd211e09e upstream.

Use l2tp_tunnel_get() in pppol2tp_connect() to ensure the tunnel isn't
going to disappear while processing the rest of the function.

Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/l2tp/l2tp_ppp.c