summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-10-01 19:09:55 +0100
committerDavid S. Miller <davem@davemloft.net>2023-10-01 19:09:55 +0100
commit2be825ebb9d1b17f1a9e46af78d24b76c4ff7a1f (patch)
tree5a49235d004d92fa6330bbeacf24b5252cea032c /net/ipv4/tcp_input.c
parent06bc3668cc2a6db2831b9086f0e3c6ebda599dba (diff)
parenteb44ad4e635132754bfbcb18103f1dcb7058aedd (diff)
downloadlinux-2be825ebb9d1b17f1a9e46af78d24b76c4ff7a1f.tar.gz
linux-2be825ebb9d1b17f1a9e46af78d24b76c4ff7a1f.tar.bz2
linux-2be825ebb9d1b17f1a9e46af78d24b76c4ff7a1f.zip
Merge branch 'socket-option-lockless'
Eric Dumazet says: ==================== net: more data-races fixes and lockless socket options This is yet another round of data-races fixes, and lockless socket options. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 584825ddd0a0..22c2a7c2e65e 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -927,8 +927,8 @@ static void tcp_update_pacing_rate(struct sock *sk)
* without any lock. We want to make sure compiler wont store
* intermediate values in this location.
*/
- WRITE_ONCE(sk->sk_pacing_rate, min_t(u64, rate,
- sk->sk_max_pacing_rate));
+ WRITE_ONCE(sk->sk_pacing_rate,
+ min_t(u64, rate, READ_ONCE(sk->sk_max_pacing_rate)));
}
/* Calculate rto without backoff. This is the second half of Van Jacobson's