net: annotate data-races around sk->sk_dst_pending_confirm
[ Upstream commit eb44ad4e635132754bfbcb18103f1dcb7058aedd ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
67b7de95d1
commit
22fa35ded3
@@ -1320,7 +1320,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb,
|
||||
skb_set_hash_from_sk(skb, sk);
|
||||
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;
|
||||
|
Reference in New Issue
Block a user