aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-06-20 20:50:31 +0200
committerfirebird11 <hbgassel@gmail.com>2018-11-29 19:22:11 +0100
commit59429aa86a87f334ca29b280a9c10e45ea9a8ea1 (patch)
tree88f6a7486ca0d84ba2009e0d6f09b7346871e6b0
parentb391a2492b18aaaaec268773177eb918a7af8d79 (diff)
netfilter: nfq_ct_hook needs __rcu and __read_mostly
This removes some sparse warnings. Reported-by: Fengguang Wu <wfg@linux.intel.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--include/linux/netfilter.h2
-rw-r--r--net/netfilter/core.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 8caa0ca3beb..d563bdef856 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -400,7 +400,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
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 2c6d4b283d6..0f3ef55f58a 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -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 */