tcp: shortcut listeners in tcp_get_info()
authorEric Dumazet <edumazet@google.com>
Fri, 4 Nov 2016 18:54:31 +0000 (11:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Nov 2016 18:02:27 +0000 (13:02 -0500)
commitccbf3bfaee0e4f1ddf8103884fd4bf9f35f31f08
tree79f67165da33ac53041d93d3f76f7150ebf68dae
parent721ad32144bd8c09dc70fe03b470b44e79fbbef5
tcp: shortcut listeners in tcp_get_info()

Being lockless in tcp_get_info() is hard, because we need to add
specific synchronization in TCP fast path, like seqcount.

Following patch will change inet_diag_dump_icsk() to no longer
hold any lock for non listeners, so that we can properly acquire
socket lock in get_tcp_info() and let it return more consistent counters.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c