summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCong Wang <cong.wang@bytedance.com>2021-07-04 12:02:47 -0700
committerAlexei Starovoitov <ast@kernel.org>2021-07-15 18:17:50 -0700
commitc63829182c37c2d6d0608976d15fa61ebebe9e6b (patch)
tree99491b47f5fed463f7b5db8a7390f3376fcf523a /include
parentc7272e15f0f18d6e0f423b53207eac7a27ed5a49 (diff)
downloadlinux-stable-c63829182c37c2d6d0608976d15fa61ebebe9e6b.tar.gz
linux-stable-c63829182c37c2d6d0608976d15fa61ebebe9e6b.tar.bz2
linux-stable-c63829182c37c2d6d0608976d15fa61ebebe9e6b.zip
af_unix: Implement ->psock_update_sk_prot()
Now we can implement unix_bpf_update_proto() to update sk_prot, especially prot->close(). Signed-off-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210704190252.11866-7-xiyou.wangcong@gmail.com
Diffstat (limited to 'include')
-rw-r--r--include/net/af_unix.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index f42fdddecd41..cca645846af1 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -89,4 +89,14 @@ void unix_sysctl_unregister(struct net *net);
static inline int unix_sysctl_register(struct net *net) { return 0; }
static inline void unix_sysctl_unregister(struct net *net) {}
#endif
+
+#ifdef CONFIG_BPF_SYSCALL
+extern struct proto unix_proto;
+
+int unix_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
+void __init unix_bpf_build_proto(void);
+#else
+static inline void __init unix_bpf_build_proto(void)
+{}
+#endif
#endif