diff options
| author | Eric Dumazet <edumazet@google.com> | 2015-07-14 08:10:22 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 20:02:27 +0200 |
| commit | d47bd1113121cef9ac6c69ff04a701d4c732834b (patch) | |
| tree | 0c73c92403345cb9a1384d41b5bebed08ec197b8 /include/net | |
| parent | 1e0443912cb69ccc22cfe8337117e995a167982b (diff) | |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
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 fc62ae0a4..a04070b82 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); |
