summaryrefslogtreecommitdiff
path: root/kernel/sysctl_binary.c
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2020-05-22 00:57:32 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 16:40:31 +0200
commit57cf7aa66fb7b3ec4a3c5f31c996944233addcba (patch)
tree9b259b7fc73842cca379b986c300ed0b6e897dc3 /kernel/sysctl_binary.c
parenteb34471f73dafc9cda27226cdf3fbafde5f04470 (diff)
l2tp: hold tunnel while handling genl TUNNEL_GET commands
commit 4e4b21da3acc68a7ea55f850cacc13706b7480e9 upstream. Use l2tp_tunnel_get() instead of l2tp_tunnel_find() so that we get a reference on the tunnel, preventing l2tp_tunnel_destruct() from freeing it from under us. Also move l2tp_tunnel_get() below nlmsg_new() so that we only take the reference when needed. 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>
Diffstat (limited to 'kernel/sysctl_binary.c')
0 files changed, 0 insertions, 0 deletions