]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 28 Jun 2015 17:39:26 +0000 (13:39 -0400)
commit12e17659b59a626dfe5e58436ffbd420aa271f3f
treefce047b6856167b57595bd0070db7dea0f3e3de6
parentc2c3964c8567d5d2b6bfa8534202850112de1d7d
tcp: tcp_get_info() should fetch socket fields once

[ Upstream commit fad9dfefea6405039491e7e4fc21fb6e59e7d26c ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
net/ipv4/tcp.c