]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
tcp: ensure proper barriers in lockless contexts
authorEric Dumazet <edumazet@google.com>
Thu, 12 Nov 2015 16:43:18 +0000 (08:43 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Nov 2015 23:36:38 +0000 (18:36 -0500)
commit00fd38d938db3f1ab1c486549afc450cb7e751b1
tree484653a166b88da8777c900a01b2b8e0d5455147
parent5883d9c6d7e680bcdc7a8a9ed2509cd10dd98206
tcp: ensure proper barriers in lockless contexts

Some functions access TCP sockets without holding a lock and
might output non consistent data, depending on compiler and or
architecture.

tcp_diag_get_info(), tcp_get_info(), tcp_poll(), get_tcp4_sock() ...

Introduce sk_state_load() and sk_state_store() to fix the issues,
and more clearly document where this lack of locking is happening.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/ipv4/inet_connection_sock.c
net/ipv4/tcp.c
net/ipv4/tcp_diag.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c