tcp: tcp_get_info() should fetch socket fields once

[ Upstream commit fad9dfefea ]

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: 977cb0ecf8 ("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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
This commit is contained in:
Eric Dumazet 2015-04-16 16:12:28 -07:00 • committed by Sasha Levin
commit 12e17659b5