diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-21 20:28:18 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-01 19:09:54 +0100 |
commit | eb44ad4e635132754bfbcb18103f1dcb7058aedd (patch) | |
tree | 5a49235d004d92fa6330bbeacf24b5252cea032c /net/ipv4/tcp_output.c | |
parent | 0bb4d124d34044179b42a769a0c76f389ae973b6 (diff) |
net: annotate data-races around sk->sk_dst_pending_confirm
This field can be read or written without socket lock being held.
Add annotations to avoid load-store tearing.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 970a07289480..8885552dff8e 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1325,7 +1325,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, skb->destructor = skb_is_tcp_pure_ack(skb) ? __sock_wfree : tcp_wfree; refcount_add(skb->truesize, &sk->sk_wmem_alloc); - skb_set_dst_pending_confirm(skb, sk->sk_dst_pending_confirm); + skb_set_dst_pending_confirm(skb, READ_ONCE(sk->sk_dst_pending_confirm)); /* Build TCP header and checksum it. */ th = (struct tcphdr *)skb->data; |