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)
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

Simple merge
Simple merge
Simple merge