tun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filter
[firefly-linux-kernel-4.4.55.git] / include / linux / filter.h
index 5972ffe5719a4e14012328035450759c12f43bec..5110d42118665cdab0f3bb377298b40d7c48febb 100644 (file)
@@ -446,8 +446,12 @@ int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
 void bpf_prog_destroy(struct bpf_prog *fp);
 
 int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
+int __sk_attach_filter(struct sock_fprog *fprog, struct sock *sk,
+                      bool locked);
 int sk_attach_bpf(u32 ufd, struct sock *sk);
 int sk_detach_filter(struct sock *sk);
+int __sk_detach_filter(struct sock *sk, bool locked);
+
 int sk_get_filter(struct sock *sk, struct sock_filter __user *filter,
                  unsigned int len);