ipv6: lock socket in ip6_datagram_connect()
authorEric Dumazet <edumazet@google.com>
Tue, 14 Jul 2015 06:10:22 +0000 (08:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jul 2015 00:25:51 +0000 (17:25 -0700)
commit03645a11a570d52e70631838cb786eb4253eb463
tree8a370b57010d040b59fd7e17ba90d1d8ed1c7650
parent14e4cec80cd05ad585c537db56a705ab61fbaff9
ipv6: lock socket in ip6_datagram_connect()

ip6_datagram_connect() is doing a lot of socket changes without
socket being locked.

This looks wrong, at least for udp_lib_rehash() which could corrupt
lists because of concurrent udp_sk(sk)->udp_portaddr_hash accesses.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/datagram.c
net/ipv6/datagram.c