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
This commit is contained in:
committed by
Alexei Starovoitov
parent
c7272e15f0
commit
c63829182c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user