diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-15 12:17:21 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-11-15 12:17:21 -0500 |
commit | 0e60ebe04c51807db972d03665651ae6b5c26d7e (patch) | |
tree | d76ba4540a6eb2008b2035e8f6371597e5ed6a13 /include/linux/netfilter.h | |
parent | 9811600f7c1f18152430c6b93b0a76fdd88a59ce (diff) |
netfilter: add __rcu annotations
Add some __rcu annotations and use helpers to reduce number of sparse
warnings (CONFIG_SPARSE_RCU_POINTER=y)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux/netfilter.h')
-rw-r--r-- | include/linux/netfilter.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 89341c32631..928a35ec21c 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -265,7 +265,7 @@ struct nf_afinfo { | |||
265 | int route_key_size; | 265 | int route_key_size; |
266 | }; | 266 | }; |
267 | 267 | ||
268 | extern const struct nf_afinfo *nf_afinfo[NFPROTO_NUMPROTO]; | 268 | extern const struct nf_afinfo __rcu *nf_afinfo[NFPROTO_NUMPROTO]; |
269 | static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family) | 269 | static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family) |
270 | { | 270 | { |
271 | return rcu_dereference(nf_afinfo[family]); | 271 | return rcu_dereference(nf_afinfo[family]); |
@@ -355,9 +355,9 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) | |||
355 | #endif /*CONFIG_NETFILTER*/ | 355 | #endif /*CONFIG_NETFILTER*/ |
356 | 356 | ||
357 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 357 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
358 | extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *); | 358 | extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *) __rcu; |
359 | extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); | 359 | extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); |
360 | extern void (*nf_ct_destroy)(struct nf_conntrack *); | 360 | extern void (*nf_ct_destroy)(struct nf_conntrack *) __rcu; |
361 | #else | 361 | #else |
362 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 362 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
363 | #endif | 363 | #endif |