l2tp: hold tunnel while handling genl tunnel updates
authorGuillaume Nault <g.nault@alphalink.fr>
Thu, 21 May 2020 23:39:28 +0000 (00:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 14:41:57 +0000 (16:41 +0200)
commit00cf4055d5a14584833a2b355d846a56f74ce96b
tree29c8c7593c1c1e016affe2385f9ac2364d9ec0b3
parent0b21fa707d1fc1b229020c468fefa0aa46d9e266
l2tp: hold tunnel while handling genl tunnel updates

commit 8c0e421525c9eb50d68e8f633f703ca31680b746 upstream.

We need to make sure the tunnel is not going to be destroyed by
l2tp_tunnel_destruct() concurrently.

Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP")
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/l2tp/l2tp_netlink.c