]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: make TCP_INFO more consistent
authorEric Dumazet <edumazet@google.com>
Mon, 9 Jan 2017 18:29:27 +0000 (10:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jan 2017 22:07:54 +0000 (17:07 -0500)
commitcb00d2094c6a1cac3762d60dde37d9132e21b34b
treeb37e5e194ed9232bdd2a4539d9630a1f8b5d08ee
parent4317216163862786754117d4f51ece7d21f5340b
tcp: make TCP_INFO more consistent

tcp_get_info() has to lock the socket, so lets lock it
for an extended critical section, so that various fields
have consistent values.

This solves an annoying issue that some applications
reported when multiple counters are updated during one
particular rx/rx event, and TCP_INFO was called from
another cpu.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c