From: Guillaume Nault <g.na...@alphalink.fr> Date: Mon, 30 Oct 2017 17:58:58 +0100
> 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.na...@alphalink.fr> > --- > > Note: in case of backporting to -stable, this patch only makes sense if > f3c66d4e144a ("l2tp: prevent creation of sessions on terminated tunnels") > is already present in the tree, as we need this issue to be fixed > before fixing the current one. > > The reason is that when connecting a session, we don't only depend on > the tunnel, but also on its socket. Therefore, holding a reference on > the tunnel is not enough, we also have to make sure that it's not going > to drop its socket before the session is registered. Applied and thank you for the detailed -stable explanation, it really helps.