]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: lock socket before checking flags in connect()
authorGuillaume Nault <g.nault@alphalink.fr>
Tue, 29 Nov 2016 12:09:44 +0000 (13:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 19:14:07 +0000 (14:14 -0500)
commitbd99706359a297c31d3722bcfc961098e66bd2b9
tree91d6b49fc8dab4cb02312da66d018a72975bd408
parenta34cce26ec8a0d6e2e9d6924f3495dd83d3053ad
l2tp: lock socket before checking flags in connect()

Socket flags aren't updated atomically, so the socket must be locked
while reading the SOCK_ZAPPED flag.

This issue exists for both l2tp_ip and l2tp_ip6. For IPv6, this patch
also brings error handling for __ip6_datagram_connect() failures.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv6/datagram.c
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip6.c