netfilter: nfq_ct_hook needs __rcu and __read_mostly
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 20 Jun 2012 18:50:31 +0000 (20:50 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 20 Jun 2012 18:50:31 +0000 (20:50 +0200)
This removes some sparse warnings.

Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter.h
net/netfilter/core.c

index dca19e61b30a0bc27fef7a39c0cd3df67d92790a..38b96a54f9a592d546cd20265ab73d9d8c6a31e5 100644 (file)
@@ -404,7 +404,7 @@ struct nfq_ct_hook {
        void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct,
                           u32 ctinfo, int off);
 };
-extern struct nfq_ct_hook *nfq_ct_hook;
+extern struct nfq_ct_hook __rcu *nfq_ct_hook;
 #else
 static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {}
 #endif
index 7eef8453b909e083891a75e4e88bdd677d6d6b04..4cd10ed2d6e685bc1d2fde55f7f676241240c423 100644 (file)
@@ -265,7 +265,7 @@ void nf_conntrack_destroy(struct nf_conntrack *nfct)
 }
 EXPORT_SYMBOL(nf_conntrack_destroy);
 
-struct nfq_ct_hook *nfq_ct_hook;
+struct nfq_ct_hook __rcu *nfq_ct_hook __read_mostly;
 EXPORT_SYMBOL_GPL(nfq_ct_hook);
 
 #endif /* CONFIG_NF_CONNTRACK */