bpf, udp: Remove some pointless comments
authorCong Wang <cong.wang@bytedance.com>
Sat, 3 Apr 2021 05:27:15 +0000 (22:27 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 6 Apr 2021 21:26:04 +0000 (23:26 +0200)
These comments in udp_bpf_update_proto() are copied from the
original TCP code and apparently do not apply to UDP. Just
remove them.

Reported-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20210403052715.13854-1-xiyou.wangcong@gmail.com
net/ipv4/udp_bpf.c

index 7d5c4ebf42fe915ea438c988faf7464903d830fd..4a7e38c5d842008bbf0a3bbe12227e8de376c16e 100644 (file)
@@ -110,7 +110,6 @@ int udp_bpf_update_proto(struct sock *sk, bool restore)
 
        if (restore) {
                sk->sk_write_space = psock->saved_write_space;
-               /* Pairs with lockless read in sk_clone_lock() */
                WRITE_ONCE(sk->sk_prot, psock->sk_proto);
                return 0;
        }
@@ -118,7 +117,6 @@ int udp_bpf_update_proto(struct sock *sk, bool restore)
        if (sk->sk_family == AF_INET6)
                udp_bpf_check_v6_needs_rebuild(psock->sk_proto);
 
-       /* Pairs with lockless read in sk_clone_lock() */
        WRITE_ONCE(sk->sk_prot, &udp_bpf_prots[family]);
        return 0;
 }