Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -2
+1 -1
include/linux/netfilter.h
··· 404 404 void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct, 405 405 u32 ctinfo, int off); 406 406 }; 407 - extern struct nfq_ct_hook *nfq_ct_hook; 407 + extern struct nfq_ct_hook __rcu *nfq_ct_hook; 408 408 #else 409 409 static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} 410 410 #endif
+1 -1
net/netfilter/core.c
··· 265 265 } 266 266 EXPORT_SYMBOL(nf_conntrack_destroy); 267 267 268 - struct nfq_ct_hook *nfq_ct_hook; 268 + struct nfq_ct_hook __rcu *nfq_ct_hook __read_mostly; 269 269 EXPORT_SYMBOL_GPL(nfq_ct_hook); 270 270 271 271 #endif /* CONFIG_NF_CONNTRACK */