]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit11e688dd8bf926b85597aad1f4b902a13b4baec7
tree8a370b57010d040b59fd7e17ba90d1d8ed1c7650
parente41e7a66f3186a911704587963ac0e43770ff9d5
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