Skip to content

Commit

Permalink
netfilter: nf_log: fix sparse warning in nf_logger_find_get()
Browse files Browse the repository at this point in the history
net/netfilter/nf_log.c:157:16: warning: incorrect type in assignment (different address spaces)
net/netfilter/nf_log.c:157:16:    expected struct nf_logger *logger
net/netfilter/nf_log.c:157:16:    got struct nf_logger [noderef] <asn:4>*<noident>

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Pablo Neira Ayuso committed Nov 4, 2014
1 parent 01cfa0a commit c5a589c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/netfilter/nf_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ int nf_logger_find_get(int pf, enum nf_log_type type)
struct nf_logger *logger;
int ret = -ENOENT;

logger = loggers[pf][type];
if (logger == NULL)
if (rcu_access_pointer(loggers[pf][type]) == NULL)
request_module("nf-logger-%u-%u", pf, type);

rcu_read_lock();
Expand Down

0 comments on commit c5a589c

Please sign in to comment.