diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 18e3a12eb1b2..59c8a027721b 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2595,6 +2595,7 @@ void tcp_get_info(const struct sock *sk, struct tcp_info *info) | |||
2595 | const struct tcp_sock *tp = tcp_sk(sk); | 2595 | const struct tcp_sock *tp = tcp_sk(sk); |
2596 | const struct inet_connection_sock *icsk = inet_csk(sk); | 2596 | const struct inet_connection_sock *icsk = inet_csk(sk); |
2597 | u32 now = tcp_time_stamp; | 2597 | u32 now = tcp_time_stamp; |
2598 | u32 rate; | ||
2598 | 2599 | ||
2599 | memset(info, 0, sizeof(*info)); | 2600 | memset(info, 0, sizeof(*info)); |
2600 | 2601 | ||
@@ -2655,10 +2656,11 @@ void tcp_get_info(const struct sock *sk, struct tcp_info *info) | |||
2655 | 2656 | ||
2656 | info->tcpi_total_retrans = tp->total_retrans; | 2657 | info->tcpi_total_retrans = tp->total_retrans; |
2657 | 2658 | ||
2658 | info->tcpi_pacing_rate = sk->sk_pacing_rate != ~0U ? | 2659 | rate = READ_ONCE(sk->sk_pacing_rate); |
2659 | sk->sk_pacing_rate : ~0ULL; | 2660 | info->tcpi_pacing_rate = rate != ~0U ? rate : ~0ULL; |
2660 | info->tcpi_max_pacing_rate = sk->sk_max_pacing_rate != ~0U ? | 2661 | |
2661 | sk->sk_max_pacing_rate : ~0ULL; | 2662 | rate = READ_ONCE(sk->sk_max_pacing_rate); |
2663 | info->tcpi_max_pacing_rate = rate != ~0U ? rate : ~0ULL; | ||
2662 | } | 2664 | } |
2663 | EXPORT_SYMBOL_GPL(tcp_get_info); | 2665 | EXPORT_SYMBOL_GPL(tcp_get_info); |
2664 | 2666 | ||