linux/net/l2tp
Tom Parkin 7b7c0719cd l2tp: avoid deadlock in l2tp stats update
l2tp's u64_stats writers were incorrectly synchronised, making it possible to
deadlock a 64bit machine running a 32bit kernel simply by sending the l2tp
code netlink commands while passing data through l2tp sessions.

Previous discussion on netdev determined that alternative solutions such as
spinlock writer synchronisation or per-cpu data would bring unjustified
overhead, given that most users interested in high volume traffic will likely
be running 64bit kernels on 64bit hardware.

As such, this patch replaces l2tp's use of u64_stats with atomic_long_t,
thereby avoiding the deadlock.

Ref:
http://marc.info/?l=linux-netdev&m=134029167910731&w=2
http://marc.info/?l=linux-netdev&m=134079868111131&w=2

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-20 12:10:39 -04:00
..
Kconfig net/l2tp: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:40:01 -08:00
Makefile l2tp: introduce L2TPv3 IP encapsulation support for IPv6 2012-05-01 09:30:55 -04:00
l2tp_core.c l2tp: avoid deadlock in l2tp stats update 2013-03-20 12:10:39 -04:00
l2tp_core.h l2tp: avoid deadlock in l2tp stats update 2013-03-20 12:10:39 -04:00
l2tp_debugfs.c l2tp: avoid deadlock in l2tp stats update 2013-03-20 12:10:39 -04:00
l2tp_eth.c l2tp: fix oops in l2tp_eth_create() error path 2012-11-02 21:56:35 -04:00
l2tp_ip.c l2tp: close sessions in ip socket destroy callback 2013-03-20 12:10:38 -04:00
l2tp_ip6.c l2tp: close sessions in ip socket destroy callback 2013-03-20 12:10:38 -04:00
l2tp_netlink.c l2tp: avoid deadlock in l2tp stats update 2013-03-20 12:10:39 -04:00
l2tp_ppp.c l2tp: avoid deadlock in l2tp stats update 2013-03-20 12:10:39 -04:00