diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index a6338d039857..7d3f7ce239b5 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -754,6 +754,7 @@ struct proto { | |||
754 | void (*unhash)(struct sock *sk); | 754 | void (*unhash)(struct sock *sk); |
755 | void (*rehash)(struct sock *sk); | 755 | void (*rehash)(struct sock *sk); |
756 | int (*get_port)(struct sock *sk, unsigned short snum); | 756 | int (*get_port)(struct sock *sk, unsigned short snum); |
757 | void (*clear_sk)(struct sock *sk, int size); | ||
757 | 758 | ||
758 | /* Keeping track of sockets in use */ | 759 | /* Keeping track of sockets in use */ |
759 | #ifdef CONFIG_PROC_FS | 760 | #ifdef CONFIG_PROC_FS |
@@ -852,6 +853,8 @@ static inline void __sk_prot_rehash(struct sock *sk) | |||
852 | sk->sk_prot->hash(sk); | 853 | sk->sk_prot->hash(sk); |
853 | } | 854 | } |
854 | 855 | ||
856 | void sk_prot_clear_portaddr_nulls(struct sock *sk, int size); | ||
857 | |||
855 | /* About 10 seconds */ | 858 | /* About 10 seconds */ |
856 | #define SOCK_DESTROY_TIME (10*HZ) | 859 | #define SOCK_DESTROY_TIME (10*HZ) |
857 | 860 | ||
@@ -1155,6 +1158,8 @@ extern void sk_common_release(struct sock *sk); | |||
1155 | /* Initialise core socket variables */ | 1158 | /* Initialise core socket variables */ |
1156 | extern void sock_init_data(struct socket *sock, struct sock *sk); | 1159 | extern void sock_init_data(struct socket *sock, struct sock *sk); |
1157 | 1160 | ||
1161 | extern void sk_filter_release_rcu(struct rcu_head *rcu); | ||
1162 | |||
1158 | /** | 1163 | /** |
1159 | * sk_filter_release - release a socket filter | 1164 | * sk_filter_release - release a socket filter |
1160 | * @fp: filter to remove | 1165 | * @fp: filter to remove |
@@ -1165,7 +1170,7 @@ extern void sock_init_data(struct socket *sock, struct sock *sk); | |||
1165 | static inline void sk_filter_release(struct sk_filter *fp) | 1170 | static inline void sk_filter_release(struct sk_filter *fp) |
1166 | { | 1171 | { |
1167 | if (atomic_dec_and_test(&fp->refcnt)) | 1172 | if (atomic_dec_and_test(&fp->refcnt)) |
1168 | kfree(fp); | 1173 | call_rcu_bh(&fp->rcu, sk_filter_release_rcu); |
1169 | } | 1174 | } |
1170 | 1175 | ||
1171 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) | 1176 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) |