diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_input.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 47b8ab7dce9c..eb651a069a6c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -755,7 +755,12 @@ static void tcp_update_pacing_rate(struct sock *sk) | |||
755 | if (tp->srtt > 8 + 2) | 755 | if (tp->srtt > 8 + 2) |
756 | do_div(rate, tp->srtt); | 756 | do_div(rate, tp->srtt); |
757 | 757 | ||
758 | sk->sk_pacing_rate = min_t(u64, rate, sk->sk_max_pacing_rate); | 758 | /* ACCESS_ONCE() is needed because sch_fq fetches sk_pacing_rate |
759 | * without any lock. We want to make sure compiler wont store | ||
760 | * intermediate values in this location. | ||
761 | */ | ||
762 | ACCESS_ONCE(sk->sk_pacing_rate) = min_t(u64, rate, | ||
763 | sk->sk_max_pacing_rate); | ||
759 | } | 764 | } |
760 | 765 | ||
761 | /* Calculate rto without backoff. This is the second half of Van Jacobson's | 766 | /* Calculate rto without backoff. This is the second half of Van Jacobson's |