diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-07-20 12:34:24 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-07-20 12:34:24 -0700 |
commit | 7998c0ad4c89cbb0bcd1594d9f989c8a5853daf7 (patch) | |
tree | bc0434cfbd9a1d6ecf48ff10f073e031e60808e9 /net/ipv4/tcp_ipv4.c | |
parent | ac528649f7c63bc233cc0d33cff11f767cc666e3 (diff) | |
parent | 70f360dd7042cb843635ece9d28335a4addff9eb (diff) |
Merge branch 'tcp-add-missing-annotations'
Eric Dumazet says:
====================
tcp: add missing annotations
This series was inspired by one syzbot (KCSAN) report.
do_tcp_getsockopt() does not lock the socket, we need to
annotate most of the reads there (and other places as well).
This is a first round, another series will come later.
====================
Link: https://lore.kernel.org/r/20230719212857.3943972-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index b5c81cf5b86f..069642014636 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -307,8 +307,9 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) inet->inet_daddr, inet->inet_sport, usin->sin_port)); - tp->tsoffset = secure_tcp_ts_off(net, inet->inet_saddr, - inet->inet_daddr); + WRITE_ONCE(tp->tsoffset, + secure_tcp_ts_off(net, inet->inet_saddr, + inet->inet_daddr)); } inet->inet_id = get_random_u16(); |