linux/net/l2tp
Guillaume Nault 5846c131c3 l2tp: hold reference on tunnels in netlink dumps
l2tp_tunnel_find_nth() is unsafe: no reference is held on the returned
tunnel, therefore it can be freed whenever the caller uses it.
This patch defines l2tp_tunnel_get_nth() which works similarly, but
also takes a reference on the returned tunnel. The caller then has to
drop it after it stops using the tunnel.

Convert netlink dumps to make them safe against concurrent tunnel
deletion.

Fixes: 309795f4be ("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>
2018-04-13 12:17:26 -04:00
..
Kconfig l2tp: Call udp_sock_create 2014-07-14 16:12:15 -07:00
l2tp_core.c l2tp: hold reference on tunnels in netlink dumps 2018-04-13 12:17:26 -04:00
l2tp_core.h l2tp: hold reference on tunnels in netlink dumps 2018-04-13 12:17:26 -04:00
l2tp_debugfs.c l2tp: remove l2specific_len configurable parameter 2018-01-19 15:00:49 -05:00
l2tp_eth.c l2tp: remove .tunnel_sock from struct l2tp_eth 2017-11-11 22:08:23 +09:00
l2tp_ip6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
l2tp_ip.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
l2tp_netlink.c l2tp: hold reference on tunnels in netlink dumps 2018-04-13 12:17:26 -04:00
l2tp_ppp.c l2tp: fix races in tunnel creation 2018-04-11 17:41:27 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00