diff options
| author | Pavel Begunkov <[email protected]> | 2022-10-26 23:25:57 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-10-29 03:21:25 +0000 |
| commit | fee9ac06647e59a69fb7aec58f25267c134264b4 (patch) | |
| tree | 1e0dcc256b6989057ca328e93d0aac846722405b /net/ipv4/tcp_bpf.c | |
| parent | udp: advertise ipv6 udp support for msghdr::ubuf_info (diff) | |
| download | kernel-fee9ac06647e59a69fb7aec58f25267c134264b4.tar.gz kernel-fee9ac06647e59a69fb7aec58f25267c134264b4.zip | |
net: remove SOCK_SUPPORT_ZC from sockmap
sockmap replaces ->sk_prot with its own callbacks, we should remove
SOCK_SUPPORT_ZC as the new proto doesn't support msghdr::ubuf_info.
Cc: <[email protected]> # 6.0
Reported-by: Jakub Kicinski <[email protected]>
Fixes: e993ffe3da4bc ("net: flag sockets supporting msghdr originated zerocopy")
Signed-off-by: Pavel Begunkov <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_bpf.c')
| -rw-r--r-- | net/ipv4/tcp_bpf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c index a1626afe87a1..c501c329b1db 100644 --- a/net/ipv4/tcp_bpf.c +++ b/net/ipv4/tcp_bpf.c @@ -607,7 +607,7 @@ int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore) } else { sk->sk_write_space = psock->saved_write_space; /* Pairs with lockless read in sk_clone_lock() */ - WRITE_ONCE(sk->sk_prot, psock->sk_proto); + sock_replace_proto(sk, psock->sk_proto); } return 0; } @@ -620,7 +620,7 @@ int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore) } /* Pairs with lockless read in sk_clone_lock() */ - WRITE_ONCE(sk->sk_prot, &tcp_bpf_prots[family][config]); + sock_replace_proto(sk, &tcp_bpf_prots[family][config]); return 0; } EXPORT_SYMBOL_GPL(tcp_bpf_update_proto); |
