[PATCH RFC tip/core/rcu 18/23] net/netfilter: __rcu annotations

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Wednesday, May 12, 2010 - 2:33 pm

From: Arnd Bergmann <arnd@relay.de.ibm.com>

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
---
 include/net/netfilter/nf_conntrack.h |    2 +-
 net/ipv4/netfilter/nf_nat_core.c     |    2 +-
 net/netfilter/core.c                 |    2 +-
 net/netfilter/nf_conntrack_ecache.c  |    4 ++--
 net/netfilter/nf_conntrack_extend.c  |    2 +-
 net/netfilter/nf_conntrack_proto.c   |    4 ++--
 net/netfilter/nf_log.c               |    2 +-
 net/netfilter/nf_queue.c             |    2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index bde095f..92229d1 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -75,7 +75,7 @@ struct nf_conntrack_helper;
 /* nf_conn feature for connections that have a helper */
 struct nf_conn_help {
 	/* Helper. if any */
-	struct nf_conntrack_helper *helper;
+	struct nf_conntrack_helper __rcu *helper;
 
 	union nf_conntrack_help help;
 
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index 4f8bddb..1263f2a 100644
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -38,7 +38,7 @@ static DEFINE_SPINLOCK(nf_nat_lock);
 static struct nf_conntrack_l3proto *l3proto __read_mostly;
 
 #define MAX_IP_NAT_PROTO 256
-static const struct nf_nat_protocol *nf_nat_protos[MAX_IP_NAT_PROTO]
+static const struct nf_nat_protocol __rcu *nf_nat_protos[MAX_IP_NAT_PROTO]
 						__read_mostly;
 
 static inline const struct nf_nat_protocol *
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 78b505d..fdaec7d 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -27,7 +27,7 @@
 
 static DEFINE_MUTEX(afinfo_mutex);
 
-const struct nf_afinfo *nf_afinfo[NFPROTO_NUMPROTO] __read_mostly;
+const struct nf_afinfo __rcu *nf_afinfo[NFPROTO_NUMPROTO] __read_mostly;
 EXPORT_SYMBOL(nf_afinfo);
 
 int nf_register_afinfo(const struct nf_afinfo *afinfo)
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
index f516961..97619fc 100644
--- a/net/netfilter/nf_conntrack_ecache.c
+++ b/net/netfilter/nf_conntrack_ecache.c
@@ -26,10 +26,10 @@
 
 static DEFINE_MUTEX(nf_ct_ecache_mutex);
 
-struct nf_ct_event_notifier *nf_conntrack_event_cb __read_mostly;
+struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb __read_mostly;
 EXPORT_SYMBOL_GPL(nf_conntrack_event_cb);
 
-struct nf_exp_event_notifier *nf_expect_event_cb __read_mostly;
+struct nf_exp_event_notifier __rcu *nf_expect_event_cb __read_mostly;
 EXPORT_SYMBOL_GPL(nf_expect_event_cb);
 
 /* deliver cached events and clear cache entry - must be called with locally
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
index fdc8fb4..9a0f75f 100644
--- a/net/netfilter/nf_conntrack_extend.c
+++ b/net/netfilter/nf_conntrack_extend.c
@@ -16,7 +16,7 @@
 #include <linux/skbuff.h>
 #include <net/netfilter/nf_conntrack_extend.h>
 
-static struct nf_ct_ext_type *nf_ct_ext_types[NF_CT_EXT_NUM];
+static struct nf_ct_ext_type __rcu *nf_ct_ext_types[NF_CT_EXT_NUM];
 static DEFINE_MUTEX(nf_ct_ext_type_mutex);
 
 void __nf_ct_ext_destroy(struct nf_conn *ct)
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
index a44fa75..45b8091 100644
--- a/net/netfilter/nf_conntrack_proto.c
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -30,8 +30,8 @@
 #include <net/netfilter/nf_conntrack_l4proto.h>
 #include <net/netfilter/nf_conntrack_core.h>
 
-static struct nf_conntrack_l4proto **nf_ct_protos[PF_MAX] __read_mostly;
-struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX] __read_mostly;
+static struct nf_conntrack_l4proto __rcu **nf_ct_protos[PF_MAX] __read_mostly;
+struct nf_conntrack_l3proto __rcu *nf_ct_l3protos[AF_MAX] __read_mostly;
 EXPORT_SYMBOL_GPL(nf_ct_l3protos);
 
 static DEFINE_MUTEX(nf_ct_proto_mutex);
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 015725a..64ba4d6 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -16,7 +16,7 @@
 #define NF_LOG_PREFIXLEN		128
 #define NFLOGGER_NAME_LEN		64
 
-static const struct nf_logger *nf_loggers[NFPROTO_NUMPROTO] __read_mostly;
+static const struct nf_logger __rcu *nf_loggers[NFPROTO_NUMPROTO] __read_mostly;
 static struct list_head nf_loggers_l[NFPROTO_NUMPROTO] __read_mostly;
 static DEFINE_MUTEX(nf_log_mutex);
 
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index c49ef21..e137c6b 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -17,7 +17,7 @@
  * long term mutex.  The handler must provide an an outfn() to accept packets
  * for queueing and must reinject all packets it receives, no matter what.
  */
-static const struct nf_queue_handler *queue_handler[NFPROTO_NUMPROTO] __read_mostly;
+static const struct nf_queue_handler __rcu *queue_handler[NFPROTO_NUMPROTO] __read_mostly;
 
 static DEFINE_MUTEX(queue_handler_mutex);
 
-- 
1.7.0.6

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC tip/core/rcu 08/23] cgroups: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 09/23] credentials: rcu annotation, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 10/23] keys: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 11/23] nfs: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 12/23] net: __rcu annotations for ..., Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 13/23] perf_event: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 14/23] notifiers: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 15/23] radix-tree: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 16/23] idr: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 17/23] input: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 18/23] net/netfilter: __rcu annota ..., Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 19/23] kvm: add __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 20/23] kernel: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 21/23] net: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 22/23] kvm: more __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
Re: [PATCH RFC tip/core/rcu 04/23] net: Make accesses to - ..., Stephen Hemminger, (Wed May 12, 2:44 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Wed May 12, 2:48 pm)
Re: [PATCH RFC tip/core/rcu 04/23] net: Make accesses to - ..., Stephen Hemminger, (Wed May 12, 6:33 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Wed May 12, 8:53 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Wed May 12, 9:50 pm)
Re: [PATCH RFC tip/core/rcu 17/23] input: __rcu annotations, Dmitry Torokhov, (Thu May 13, 12:40 am)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Paul E. McKenney, (Thu May 13, 12:55 pm)
Re: [PATCH RFC tip/core/rcu 02/23] rcu: add __rcu API for ..., Paul E. McKenney, (Thu May 13, 2:48 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Mon May 17, 1:33 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Mon May 17, 3:00 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Mon May 17, 4:08 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Mon May 17, 4:40 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Mon May 17, 6:35 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Tue May 18, 7:25 am)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Tue May 18, 7:47 am)