diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-15 17:17:21 (GMT) |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-11-15 17:17:21 (GMT) |
commit | 0e60ebe04c51807db972d03665651ae6b5c26d7e (patch) | |
tree | d76ba4540a6eb2008b2035e8f6371597e5ed6a13 /net/netfilter/nf_log.c | |
parent | 9811600f7c1f18152430c6b93b0a76fdd88a59ce (diff) | |
download | linux-0e60ebe04c51807db972d03665651ae6b5c26d7e.tar.xz |
netfilter: add __rcu annotations
Add some __rcu annotations and use helpers to reduce number of sparse
warnings (CONFIG_SPARSE_RCU_POINTER=y)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/nf_log.c')
-rw-r--r-- | net/netfilter/nf_log.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index b07393e..20c775c 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -161,7 +161,8 @@ static int seq_show(struct seq_file *s, void *v) struct nf_logger *t; int ret; - logger = nf_loggers[*pos]; + logger = rcu_dereference_protected(nf_loggers[*pos], + lockdep_is_held(&nf_log_mutex)); if (!logger) ret = seq_printf(s, "%2lld NONE (", *pos); @@ -249,7 +250,8 @@ static int nf_log_proc_dostring(ctl_table *table, int write, mutex_unlock(&nf_log_mutex); } else { mutex_lock(&nf_log_mutex); - logger = nf_loggers[tindex]; + logger = rcu_dereference_protected(nf_loggers[tindex], + lockdep_is_held(&nf_log_mutex)); if (!logger) table->data = "NONE"; else |