tcp: tcp_get_info() should fetch socket fields once
authorEric Dumazet <edumazet@google.com>
Thu, 16 Apr 2015 23:12:28 +0000 (16:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2015 17:28:31 +0000 (13:28 -0400)
commitfad9dfefea6405039491e7e4fc21fb6e59e7d26c
treedb00e0628d50740f70b98effd4f39eed46161dd4
parentc3ffe6d2c9733729307799a60e1ae09a9878e697
tcp: tcp_get_info() should fetch socket fields once

tcp_get_info() can be called without holding socket lock,
so any socket fields can change under us.

Use READ_ONCE() to fetch sk_pacing_rate and sk_max_pacing_rate

Fixes: 977cb0ecf82e ("tcp: add pacing_rate information into tcp_info")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c