Revert "tty: hvc: Fix data abort due to race in hvc_open"
[linux/fpc-iii.git] / include / net / bpf_sk_storage.h
blob5036c94c0503550eb634b07462987c31b88198d5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2019 Facebook */
3 #ifndef _BPF_SK_STORAGE_H
4 #define _BPF_SK_STORAGE_H
6 struct sock;
8 void bpf_sk_storage_free(struct sock *sk);
10 extern const struct bpf_func_proto bpf_sk_storage_get_proto;
11 extern const struct bpf_func_proto bpf_sk_storage_delete_proto;
13 struct bpf_sk_storage_diag;
14 struct sk_buff;
15 struct nlattr;
16 struct sock;
18 #ifdef CONFIG_BPF_SYSCALL
19 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk);
20 struct bpf_sk_storage_diag *
21 bpf_sk_storage_diag_alloc(const struct nlattr *nla_stgs);
22 void bpf_sk_storage_diag_free(struct bpf_sk_storage_diag *diag);
23 int bpf_sk_storage_diag_put(struct bpf_sk_storage_diag *diag,
24 struct sock *sk, struct sk_buff *skb,
25 int stg_array_type,
26 unsigned int *res_diag_size);
27 #else
28 static inline int bpf_sk_storage_clone(const struct sock *sk,
29 struct sock *newsk)
31 return 0;
33 static inline struct bpf_sk_storage_diag *
34 bpf_sk_storage_diag_alloc(const struct nlattr *nla)
36 return NULL;
38 static inline void bpf_sk_storage_diag_free(struct bpf_sk_storage_diag *diag)
41 static inline int bpf_sk_storage_diag_put(struct bpf_sk_storage_diag *diag,
42 struct sock *sk, struct sk_buff *skb,
43 int stg_array_type,
44 unsigned int *res_diag_size)
46 return 0;
48 #endif
50 #endif /* _BPF_SK_STORAGE_H */