netfilter: nf_conntrack: add missing __rcu annotations

Access to the hook pointers use correct helpers but the pointers lack
the needed __rcu annotation.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Florian Westphal 2022-06-22 11:00:45 +02:00 committed by Pablo Neira Ayuso
parent b038177636
commit 6976890e89
5 changed files with 5 additions and 5 deletions

View file

@ -164,7 +164,7 @@ struct nf_nat_sip_hooks {
unsigned int medialen, unsigned int medialen,
union nf_inet_addr *rtp_addr); union nf_inet_addr *rtp_addr);
}; };
extern const struct nf_nat_sip_hooks *nf_nat_sip_hooks; extern const struct nf_nat_sip_hooks __rcu *nf_nat_sip_hooks;
int ct_sip_parse_request(const struct nf_conn *ct, const char *dptr, int ct_sip_parse_request(const struct nf_conn *ct, const char *dptr,
unsigned int datalen, unsigned int *matchoff, unsigned int datalen, unsigned int *matchoff,

View file

@ -105,7 +105,7 @@ struct nf_ct_timeout_hooks {
void (*timeout_put)(struct nf_ct_timeout *timeout); void (*timeout_put)(struct nf_ct_timeout *timeout);
}; };
extern const struct nf_ct_timeout_hooks *nf_ct_timeout_hook; extern const struct nf_ct_timeout_hooks __rcu *nf_ct_timeout_hook;
#endif #endif
#endif /* _NF_CONNTRACK_TIMEOUT_H */ #endif /* _NF_CONNTRACK_TIMEOUT_H */

View file

@ -45,7 +45,7 @@ MODULE_ALIAS_NFCT_HELPER("pptp");
static DEFINE_SPINLOCK(nf_pptp_lock); static DEFINE_SPINLOCK(nf_pptp_lock);
const struct nf_nat_pptp_hook *nf_nat_pptp_hook; const struct nf_nat_pptp_hook __rcu *nf_nat_pptp_hook;
EXPORT_SYMBOL_GPL(nf_nat_pptp_hook); EXPORT_SYMBOL_GPL(nf_nat_pptp_hook);
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)

View file

@ -60,7 +60,7 @@ module_param(sip_external_media, int, 0600);
MODULE_PARM_DESC(sip_external_media, "Expect Media streams between external " MODULE_PARM_DESC(sip_external_media, "Expect Media streams between external "
"endpoints (default 0)"); "endpoints (default 0)");
const struct nf_nat_sip_hooks *nf_nat_sip_hooks; const struct nf_nat_sip_hooks __rcu *nf_nat_sip_hooks;
EXPORT_SYMBOL_GPL(nf_nat_sip_hooks); EXPORT_SYMBOL_GPL(nf_nat_sip_hooks);
static int string_len(const struct nf_conn *ct, const char *dptr, static int string_len(const struct nf_conn *ct, const char *dptr,

View file

@ -22,7 +22,7 @@
#include <net/netfilter/nf_conntrack_l4proto.h> #include <net/netfilter/nf_conntrack_l4proto.h>
#include <net/netfilter/nf_conntrack_timeout.h> #include <net/netfilter/nf_conntrack_timeout.h>
const struct nf_ct_timeout_hooks *nf_ct_timeout_hook __read_mostly; const struct nf_ct_timeout_hooks __rcu *nf_ct_timeout_hook __read_mostly;
EXPORT_SYMBOL_GPL(nf_ct_timeout_hook); EXPORT_SYMBOL_GPL(nf_ct_timeout_hook);
static int untimeout(struct nf_conn *ct, void *timeout) static int untimeout(struct nf_conn *ct, void *timeout)