diff options
author | Eric Dumazet <edumazet@google.com> | 2015-07-14 09:10:22 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-08-27 10:27:01 +0300 |
commit | b29321b96de6167daf84306903cedc5b214fe5b7 (patch) | |
tree | b74bc4049f1b0ecd6e2fc00f214dae6110274f84 /include/net | |
parent | 4a187391f4c7d54b9c07eed08de48ffd6e0a3f20 (diff) | |
download | linux-b29321b96de6167daf84306903cedc5b214fe5b7.tar.xz |
ipv6: lock socket in ip6_datagram_connect()
[ Upstream commit 03645a11a570d52e70631838cb786eb4253eb463 ]
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ip.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 1b1269e13596..553c07514a05 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -141,6 +141,7 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) } /* datagram.c */ +int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); extern int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |