diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-15 19:45:13 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-11-15 19:45:13 +0100 |
commit | c5d277d29ad1ae9add8d6984025ccd2e835971ce (patch) | |
tree | d829006da562f7f6ac1cdf983a56d26435e7093a /net/netfilter/nf_conntrack_proto.c | |
parent | ab0cba25128e1435a59b1ec4ae0c7505548fed87 (diff) | |
download | op-kernel-dev-c5d277d29ad1ae9add8d6984025ccd2e835971ce.zip op-kernel-dev-c5d277d29ad1ae9add8d6984025ccd2e835971ce.tar.gz |
netfilter: rcu sparse cleanups
Use RCU helpers to reduce number of sparse warnings
(CONFIG_SPARSE_RCU_POINTER=y), and adds lockdep checks.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/nf_conntrack_proto.c')
-rw-r--r-- | net/netfilter/nf_conntrack_proto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c index 03b56a0..5701c8d 100644 --- a/net/netfilter/nf_conntrack_proto.c +++ b/net/netfilter/nf_conntrack_proto.c @@ -284,7 +284,7 @@ int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *l4proto) mutex_lock(&nf_ct_proto_mutex); if (!nf_ct_protos[l4proto->l3proto]) { /* l3proto may be loaded latter. */ - struct nf_conntrack_l4proto **proto_array; + struct nf_conntrack_l4proto __rcu **proto_array; int i; proto_array = kmalloc(MAX_NF_CT_PROTO * @@ -296,7 +296,7 @@ int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *l4proto) } for (i = 0; i < MAX_NF_CT_PROTO; i++) - proto_array[i] = &nf_conntrack_l4proto_generic; + RCU_INIT_POINTER(proto_array[i], &nf_conntrack_l4proto_generic); /* Before making proto_array visible to lockless readers, * we must make sure its content is committed to memory. |