diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-10-27 00:25:57 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-10-28 20:21:25 -0700 |
commit | fee9ac06647e59a69fb7aec58f25267c134264b4 (patch) | |
tree | 1e0dcc256b6989057ca328e93d0aac846722405b /net/ipv4/udp_bpf.c | |
parent | 8f279fb00bb29def9ac79e28c5d6d8e07d21f3fb (diff) |
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: <stable@vger.kernel.org> # 6.0
Reported-by: Jakub Kicinski <kuba@kernel.org>
Fixes: e993ffe3da4bc ("net: flag sockets supporting msghdr originated zerocopy")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/udp_bpf.c')
-rw-r--r-- | net/ipv4/udp_bpf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/udp_bpf.c b/net/ipv4/udp_bpf.c index ff15918b7bdc..e5dc91d0e079 100644 --- a/net/ipv4/udp_bpf.c +++ b/net/ipv4/udp_bpf.c @@ -141,14 +141,14 @@ int udp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore) if (restore) { sk->sk_write_space = psock->saved_write_space; - WRITE_ONCE(sk->sk_prot, psock->sk_proto); + sock_replace_proto(sk, psock->sk_proto); return 0; } if (sk->sk_family == AF_INET6) udp_bpf_check_v6_needs_rebuild(psock->sk_proto); - WRITE_ONCE(sk->sk_prot, &udp_bpf_prots[family]); + sock_replace_proto(sk, &udp_bpf_prots[family]); return 0; } EXPORT_SYMBOL_GPL(udp_bpf_update_proto); |