linux/net/l2tp
Guillaume Nault 8b82547e33 l2tp: Restore socket refcount when sendmsg succeeds
The sendmsg() syscall handler for PPPoL2TP doesn't decrease the socket
reference counter after successful transmissions. Any successful
sendmsg() call from userspace will then increase the reference counter
forever, thus preventing the kernel's session and tunnel data from
being freed later on.

The problem only happens when writing directly on L2TP sockets.
PPP sockets attached to L2TP are unaffected as the PPP subsystem
uses pppol2tp_xmit() which symmetrically increase/decrease reference
counters.

This patch adds the missing call to sock_put() before returning from
pppol2tp_sendmsg().

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-01 14:13:09 -05:00
..
Kconfig net/l2tp: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:40:01 -08:00
l2tp_core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
l2tp_core.h l2tp: put tunnel socket release on a workqueue 2013-02-05 14:20:30 -05:00
l2tp_debugfs.c net: l2tp: Standardize logging styles 2012-05-17 04:34:38 -04:00
l2tp_eth.c l2tp: fix oops in l2tp_eth_create() error path 2012-11-02 21:56:35 -04:00
l2tp_ip6.c l2tp: correctly handle ancillary data in the ip6 recv path 2013-01-31 13:53:09 -05:00
l2tp_ip.c l2tp: Make ipv4 protocol handler namespace aware. 2013-02-05 14:37:01 -05:00
l2tp_netlink.c l2tp: set netnsok flag for netlink messages 2013-02-05 14:20:30 -05:00
l2tp_ppp.c l2tp: Restore socket refcount when sendmsg succeeds 2013-03-01 14:13:09 -05:00
Makefile l2tp: introduce L2TPv3 IP encapsulation support for IPv6 2012-05-01 09:30:55 -04:00