diff options
| author | Stephen Hemminger <shemminger@vyatta.com> | 2011-08-01 12:19:00 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-08-02 07:29:23 -0400 |
| commit | a9b3cd7f323b2e57593e7215362a7b02fc933e3a (patch) | |
| tree | eba1741956aef3015d5b1a07253bf93c4c1bc7df /net/netfilter | |
| parent | 76f793e3a47139d340185cbc1a314740c09b13d3 (diff) | |
rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER
When assigning a NULL value to an RCU protected pointer, no barrier
is needed. The rcu_assign_pointer, used to handle that but will soon
change to not handle the special case.
Convert all rcu_assign_pointer of NULL value.
//smpl
@@ expression P; @@
- rcu_assign_pointer(P, NULL)
+ RCU_INIT_POINTER(P, NULL)
// </smpl>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
| -rw-r--r-- | net/netfilter/core.c | 4 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_core.c | 12 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_ecache.c | 8 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_extend.c | 4 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_helper.c | 6 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 6 | ||||
| -rw-r--r-- | net/netfilter/nf_log.c | 10 | ||||
| -rw-r--r-- | net/netfilter/nf_queue.c | 6 | ||||
| -rw-r--r-- | net/netfilter/nfnetlink.c | 6 |
9 files changed, 31 insertions, 31 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 899b71c0ff5d..3346829ea07f 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
| @@ -37,7 +37,7 @@ int nf_register_afinfo(const struct nf_afinfo *afinfo) | |||
| 37 | err = mutex_lock_interruptible(&afinfo_mutex); | 37 | err = mutex_lock_interruptible(&afinfo_mutex); |
| 38 | if (err < 0) | 38 | if (err < 0) |
| 39 | return err; | 39 | return err; |
| 40 | rcu_assign_pointer(nf_afinfo[afinfo->family], afinfo); | 40 | RCU_INIT_POINTER(nf_afinfo[afinfo->family], afinfo); |
| 41 | mutex_unlock(&afinfo_mutex); | 41 | mutex_unlock(&afinfo_mutex); |
| 42 | return 0; | 42 | return 0; |
| 43 | } | 43 | } |
| @@ -46,7 +46,7 @@ EXPORT_SYMBOL_GPL(nf_register_afinfo); | |||
| 46 | void nf_unregister_afinfo(const struct nf_afinfo *afinfo) | 46 | void nf_unregister_afinfo(const struct nf_afinfo *afinfo) |
| 47 | { | 47 | { |
| 48 | mutex_lock(&afinfo_mutex); | 48 | mutex_lock(&afinfo_mutex); |
| 49 | rcu_assign_pointer(nf_afinfo[afinfo->family], NULL); | 49 | RCU_INIT_POINTER(nf_afinfo[afinfo->family], NULL); |
| 50 | mutex_unlock(&afinfo_mutex); | 50 | mutex_unlock(&afinfo_mutex); |
| 51 | synchronize_rcu(); | 51 | synchronize_rcu(); |
| 52 | } | 52 | } |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index f7af8b866017..5acfaf59a9c3 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
| @@ -779,7 +779,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl, | |||
| 779 | if (exp->helper) { | 779 | if (exp->helper) { |
| 780 | help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); | 780 | help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); |
| 781 | if (help) | 781 | if (help) |
| 782 | rcu_assign_pointer(help->helper, exp->helper); | 782 | RCU_INIT_POINTER(help->helper, exp->helper); |
| 783 | } | 783 | } |
| 784 | 784 | ||
| 785 | #ifdef CONFIG_NF_CONNTRACK_MARK | 785 | #ifdef CONFIG_NF_CONNTRACK_MARK |
| @@ -1317,7 +1317,7 @@ static void nf_conntrack_cleanup_net(struct net *net) | |||
| 1317 | void nf_conntrack_cleanup(struct net *net) | 1317 | void nf_conntrack_cleanup(struct net *net) |
| 1318 | { | 1318 | { |
| 1319 | if (net_eq(net, &init_net)) | 1319 | if (net_eq(net, &init_net)) |
| 1320 | rcu_assign_pointer(ip_ct_attach, NULL); | 1320 | RCU_INIT_POINTER(ip_ct_attach, NULL); |
| 1321 | 1321 | ||
| 1322 | /* This makes sure all current packets have passed through | 1322 | /* This makes sure all current packets have passed through |
| 1323 | netfilter framework. Roll on, two-stage module | 1323 | netfilter framework. Roll on, two-stage module |
| @@ -1327,7 +1327,7 @@ void nf_conntrack_cleanup(struct net *net) | |||
| 1327 | nf_conntrack_cleanup_net(net); | 1327 | nf_conntrack_cleanup_net(net); |
| 1328 | 1328 | ||
| 1329 | if (net_eq(net, &init_net)) { | 1329 | if (net_eq(net, &init_net)) { |
| 1330 | rcu_assign_pointer(nf_ct_destroy, NULL); | 1330 | RCU_INIT_POINTER(nf_ct_destroy, NULL); |
| 1331 | nf_conntrack_cleanup_init_net(); | 1331 | nf_conntrack_cleanup_init_net(); |
| 1332 | } | 1332 | } |
| 1333 | } | 1333 | } |
| @@ -1576,11 +1576,11 @@ int nf_conntrack_init(struct net *net) | |||
| 1576 | 1576 | ||
| 1577 | if (net_eq(net, &init_net)) { | 1577 | if (net_eq(net, &init_net)) { |
| 1578 | /* For use by REJECT target */ | 1578 | /* For use by REJECT target */ |
| 1579 | rcu_assign_pointer(ip_ct_attach, nf_conntrack_attach); | 1579 | RCU_INIT_POINTER(ip_ct_attach, nf_conntrack_attach); |
| 1580 | rcu_assign_pointer(nf_ct_destroy, destroy_conntrack); | 1580 | RCU_INIT_POINTER(nf_ct_destroy, destroy_conntrack); |
| 1581 | 1581 | ||
| 1582 | /* Howto get NAT offsets */ | 1582 | /* Howto get NAT offsets */ |
| 1583 | rcu_assign_pointer(nf_ct_nat_offset, NULL); | 1583 | RCU_INIT_POINTER(nf_ct_nat_offset, NULL); |
| 1584 | } | 1584 | } |
| 1585 | return 0; | 1585 | return 0; |
| 1586 | 1586 | ||
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c index 63a1b915a7e4..3add99439059 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c | |||
| @@ -94,7 +94,7 @@ int nf_conntrack_register_notifier(struct nf_ct_event_notifier *new) | |||
| 94 | ret = -EBUSY; | 94 | ret = -EBUSY; |
| 95 | goto out_unlock; | 95 | goto out_unlock; |
| 96 | } | 96 | } |
| 97 | rcu_assign_pointer(nf_conntrack_event_cb, new); | 97 | RCU_INIT_POINTER(nf_conntrack_event_cb, new); |
| 98 | mutex_unlock(&nf_ct_ecache_mutex); | 98 | mutex_unlock(&nf_ct_ecache_mutex); |
| 99 | return ret; | 99 | return ret; |
| 100 | 100 | ||
| @@ -112,7 +112,7 @@ void nf_conntrack_unregister_notifier(struct nf_ct_event_notifier *new) | |||
| 112 | notify = rcu_dereference_protected(nf_conntrack_event_cb, | 112 | notify = rcu_dereference_protected(nf_conntrack_event_cb, |
| 113 | lockdep_is_held(&nf_ct_ecache_mutex)); | 113 | lockdep_is_held(&nf_ct_ecache_mutex)); |
| 114 | BUG_ON(notify != new); | 114 | BUG_ON(notify != new); |
| 115 | rcu_assign_pointer(nf_conntrack_event_cb, NULL); | 115 | RCU_INIT_POINTER(nf_conntrack_event_cb, NULL); |
| 116 | mutex_unlock(&nf_ct_ecache_mutex); | 116 | mutex_unlock(&nf_ct_ecache_mutex); |
| 117 | } | 117 | } |
| 118 | EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier); | 118 | EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier); |
| @@ -129,7 +129,7 @@ int nf_ct_expect_register_notifier(struct nf_exp_event_notifier *new) | |||
| 129 | ret = -EBUSY; | 129 | ret = -EBUSY; |
| 130 | goto out_unlock; | 130 | goto out_unlock; |
| 131 | } | 131 | } |
| 132 | rcu_assign_pointer(nf_expect_event_cb, new); | 132 | RCU_INIT_POINTER(nf_expect_event_cb, new); |
| 133 | mutex_unlock(&nf_ct_ecache_mutex); | 133 | mutex_unlock(&nf_ct_ecache_mutex); |
| 134 | return ret; | 134 | return ret; |
| 135 | 135 | ||
| @@ -147,7 +147,7 @@ void nf_ct_expect_unregister_notifier(struct nf_exp_event_notifier *new) | |||
| 147 | notify = rcu_dereference_protected(nf_expect_event_cb, | 147 | notify = rcu_dereference_protected(nf_expect_event_cb, |
| 148 | lockdep_is_held(&nf_ct_ecache_mutex)); | 148 | lockdep_is_held(&nf_ct_ecache_mutex)); |
| 149 | BUG_ON(notify != new); | 149 | BUG_ON(notify != new); |
| 150 | rcu_assign_pointer(nf_expect_event_cb, NULL); | 150 | RCU_INIT_POINTER(nf_expect_event_cb, NULL); |
| 151 | mutex_unlock(&nf_ct_ecache_mutex); | 151 | mutex_unlock(&nf_ct_ecache_mutex); |
| 152 | } | 152 | } |
| 153 | EXPORT_SYMBOL_GPL(nf_ct_expect_unregister_notifier); | 153 | EXPORT_SYMBOL_GPL(nf_ct_expect_unregister_notifier); |
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c index 05ecdc281a53..4605c947dcc4 100644 --- a/net/netfilter/nf_conntrack_extend.c +++ b/net/netfilter/nf_conntrack_extend.c | |||
| @@ -169,7 +169,7 @@ int nf_ct_extend_register(struct nf_ct_ext_type *type) | |||
| 169 | before updating alloc_size */ | 169 | before updating alloc_size */ |
| 170 | type->alloc_size = ALIGN(sizeof(struct nf_ct_ext), type->align) | 170 | type->alloc_size = ALIGN(sizeof(struct nf_ct_ext), type->align) |
| 171 | + type->len; | 171 | + type->len; |
| 172 | rcu_assign_pointer(nf_ct_ext_types[type->id], type); | 172 | RCU_INIT_POINTER(nf_ct_ext_types[type->id], type); |
| 173 | update_alloc_size(type); | 173 | update_alloc_size(type); |
| 174 | out: | 174 | out: |
| 175 | mutex_unlock(&nf_ct_ext_type_mutex); | 175 | mutex_unlock(&nf_ct_ext_type_mutex); |
| @@ -181,7 +181,7 @@ EXPORT_SYMBOL_GPL(nf_ct_extend_register); | |||
| 181 | void nf_ct_extend_unregister(struct nf_ct_ext_type *type) | 181 | void nf_ct_extend_unregister(struct nf_ct_ext_type *type) |
| 182 | { | 182 | { |
| 183 | mutex_lock(&nf_ct_ext_type_mutex); | 183 | mutex_lock(&nf_ct_ext_type_mutex); |
| 184 | rcu_assign_pointer(nf_ct_ext_types[type->id], NULL); | 184 | RCU_INIT_POINTER(nf_ct_ext_types[type->id], NULL); |
| 185 | update_alloc_size(type); | 185 | update_alloc_size(type); |
| 186 | mutex_unlock(&nf_ct_ext_type_mutex); | 186 | mutex_unlock(&nf_ct_ext_type_mutex); |
| 187 | rcu_barrier(); /* Wait for completion of call_rcu()'s */ | 187 | rcu_barrier(); /* Wait for completion of call_rcu()'s */ |
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index 1bdfea357955..93c4bdbfc1ae 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c | |||
| @@ -131,7 +131,7 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl, | |||
| 131 | helper = __nf_ct_helper_find(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); | 131 | helper = __nf_ct_helper_find(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); |
| 132 | if (helper == NULL) { | 132 | if (helper == NULL) { |
| 133 | if (help) | 133 | if (help) |
| 134 | rcu_assign_pointer(help->helper, NULL); | 134 | RCU_INIT_POINTER(help->helper, NULL); |
| 135 | goto out; | 135 | goto out; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| @@ -145,7 +145,7 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl, | |||
| 145 | memset(&help->help, 0, sizeof(help->help)); | 145 | memset(&help->help, 0, sizeof(help->help)); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | rcu_assign_pointer(help->helper, helper); | 148 | RCU_INIT_POINTER(help->helper, helper); |
| 149 | out: | 149 | out: |
| 150 | return ret; | 150 | return ret; |
| 151 | } | 151 | } |
| @@ -162,7 +162,7 @@ static inline int unhelp(struct nf_conntrack_tuple_hash *i, | |||
| 162 | lockdep_is_held(&nf_conntrack_lock) | 162 | lockdep_is_held(&nf_conntrack_lock) |
| 163 | ) == me) { | 163 | ) == me) { |
| 164 | nf_conntrack_event(IPCT_HELPER, ct); | 164 | nf_conntrack_event(IPCT_HELPER, ct); |
| 165 | rcu_assign_pointer(help->helper, NULL); | 165 | RCU_INIT_POINTER(help->helper, NULL); |
| 166 | } | 166 | } |
| 167 | return 0; | 167 | return 0; |
| 168 | } | 168 | } |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 7dec88a1755b..e58aa9b1fe8a 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
| @@ -1125,7 +1125,7 @@ ctnetlink_change_helper(struct nf_conn *ct, const struct nlattr * const cda[]) | |||
| 1125 | if (help && help->helper) { | 1125 | if (help && help->helper) { |
| 1126 | /* we had a helper before ... */ | 1126 | /* we had a helper before ... */ |
| 1127 | nf_ct_remove_expectations(ct); | 1127 | nf_ct_remove_expectations(ct); |
| 1128 | rcu_assign_pointer(help->helper, NULL); | 1128 | RCU_INIT_POINTER(help->helper, NULL); |
| 1129 | } | 1129 | } |
| 1130 | 1130 | ||
| 1131 | return 0; | 1131 | return 0; |
| @@ -1163,7 +1163,7 @@ ctnetlink_change_helper(struct nf_conn *ct, const struct nlattr * const cda[]) | |||
| 1163 | return -EOPNOTSUPP; | 1163 | return -EOPNOTSUPP; |
| 1164 | } | 1164 | } |
| 1165 | 1165 | ||
| 1166 | rcu_assign_pointer(help->helper, helper); | 1166 | RCU_INIT_POINTER(help->helper, helper); |
| 1167 | 1167 | ||
| 1168 | return 0; | 1168 | return 0; |
| 1169 | } | 1169 | } |
| @@ -1386,7 +1386,7 @@ ctnetlink_create_conntrack(struct net *net, u16 zone, | |||
| 1386 | } | 1386 | } |
| 1387 | 1387 | ||
| 1388 | /* not in hash table yet so not strictly necessary */ | 1388 | /* not in hash table yet so not strictly necessary */ |
| 1389 | rcu_assign_pointer(help->helper, helper); | 1389 | RCU_INIT_POINTER(help->helper, helper); |
| 1390 | } | 1390 | } |
| 1391 | } else { | 1391 | } else { |
| 1392 | /* try an implicit helper assignation */ | 1392 | /* try an implicit helper assignation */ |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 20714edf6cd2..ce0c406f58a8 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
| @@ -55,7 +55,7 @@ int nf_log_register(u_int8_t pf, struct nf_logger *logger) | |||
| 55 | llog = rcu_dereference_protected(nf_loggers[pf], | 55 | llog = rcu_dereference_protected(nf_loggers[pf], |
| 56 | lockdep_is_held(&nf_log_mutex)); | 56 | lockdep_is_held(&nf_log_mutex)); |
| 57 | if (llog == NULL) | 57 | if (llog == NULL) |
| 58 | rcu_assign_pointer(nf_loggers[pf], logger); | 58 | RCU_INIT_POINTER(nf_loggers[pf], logger); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | mutex_unlock(&nf_log_mutex); | 61 | mutex_unlock(&nf_log_mutex); |
| @@ -74,7 +74,7 @@ void nf_log_unregister(struct nf_logger *logger) | |||
| 74 | c_logger = rcu_dereference_protected(nf_loggers[i], | 74 | c_logger = rcu_dereference_protected(nf_loggers[i], |
| 75 | lockdep_is_held(&nf_log_mutex)); | 75 | lockdep_is_held(&nf_log_mutex)); |
| 76 | if (c_logger == logger) | 76 | if (c_logger == logger) |
| 77 | rcu_assign_pointer(nf_loggers[i], NULL); | 77 | RCU_INIT_POINTER(nf_loggers[i], NULL); |
| 78 | list_del(&logger->list[i]); | 78 | list_del(&logger->list[i]); |
| 79 | } | 79 | } |
| 80 | mutex_unlock(&nf_log_mutex); | 80 | mutex_unlock(&nf_log_mutex); |
| @@ -92,7 +92,7 @@ int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger) | |||
| 92 | mutex_unlock(&nf_log_mutex); | 92 | mutex_unlock(&nf_log_mutex); |
| 93 | return -ENOENT; | 93 | return -ENOENT; |
| 94 | } | 94 | } |
| 95 | rcu_assign_pointer(nf_loggers[pf], logger); | 95 | RCU_INIT_POINTER(nf_loggers[pf], logger); |
| 96 | mutex_unlock(&nf_log_mutex); | 96 | mutex_unlock(&nf_log_mutex); |
| 97 | return 0; | 97 | return 0; |
| 98 | } | 98 | } |
| @@ -103,7 +103,7 @@ void nf_log_unbind_pf(u_int8_t pf) | |||
| 103 | if (pf >= ARRAY_SIZE(nf_loggers)) | 103 | if (pf >= ARRAY_SIZE(nf_loggers)) |
| 104 | return; | 104 | return; |
| 105 | mutex_lock(&nf_log_mutex); | 105 | mutex_lock(&nf_log_mutex); |
| 106 | rcu_assign_pointer(nf_loggers[pf], NULL); | 106 | RCU_INIT_POINTER(nf_loggers[pf], NULL); |
| 107 | mutex_unlock(&nf_log_mutex); | 107 | mutex_unlock(&nf_log_mutex); |
| 108 | } | 108 | } |
| 109 | EXPORT_SYMBOL(nf_log_unbind_pf); | 109 | EXPORT_SYMBOL(nf_log_unbind_pf); |
| @@ -250,7 +250,7 @@ static int nf_log_proc_dostring(ctl_table *table, int write, | |||
| 250 | mutex_unlock(&nf_log_mutex); | 250 | mutex_unlock(&nf_log_mutex); |
| 251 | return -ENOENT; | 251 | return -ENOENT; |
| 252 | } | 252 | } |
| 253 | rcu_assign_pointer(nf_loggers[tindex], logger); | 253 | RCU_INIT_POINTER(nf_loggers[tindex], logger); |
| 254 | mutex_unlock(&nf_log_mutex); | 254 | mutex_unlock(&nf_log_mutex); |
| 255 | } else { | 255 | } else { |
| 256 | mutex_lock(&nf_log_mutex); | 256 | mutex_lock(&nf_log_mutex); |
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 5b466cd1272f..c1894ae196de 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
| @@ -40,7 +40,7 @@ int nf_register_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh) | |||
| 40 | else if (old) | 40 | else if (old) |
| 41 | ret = -EBUSY; | 41 | ret = -EBUSY; |
| 42 | else { | 42 | else { |
| 43 | rcu_assign_pointer(queue_handler[pf], qh); | 43 | RCU_INIT_POINTER(queue_handler[pf], qh); |
| 44 | ret = 0; | 44 | ret = 0; |
| 45 | } | 45 | } |
| 46 | mutex_unlock(&queue_handler_mutex); | 46 | mutex_unlock(&queue_handler_mutex); |
| @@ -65,7 +65,7 @@ int nf_unregister_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh) | |||
| 65 | return -EINVAL; | 65 | return -EINVAL; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | rcu_assign_pointer(queue_handler[pf], NULL); | 68 | RCU_INIT_POINTER(queue_handler[pf], NULL); |
| 69 | mutex_unlock(&queue_handler_mutex); | 69 | mutex_unlock(&queue_handler_mutex); |
| 70 | 70 | ||
| 71 | synchronize_rcu(); | 71 | synchronize_rcu(); |
| @@ -84,7 +84,7 @@ void nf_unregister_queue_handlers(const struct nf_queue_handler *qh) | |||
| 84 | queue_handler[pf], | 84 | queue_handler[pf], |
| 85 | lockdep_is_held(&queue_handler_mutex) | 85 | lockdep_is_held(&queue_handler_mutex) |
| 86 | ) == qh) | 86 | ) == qh) |
| 87 | rcu_assign_pointer(queue_handler[pf], NULL); | 87 | RCU_INIT_POINTER(queue_handler[pf], NULL); |
| 88 | } | 88 | } |
| 89 | mutex_unlock(&queue_handler_mutex); | 89 | mutex_unlock(&queue_handler_mutex); |
| 90 | 90 | ||
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 1905976b5135..c879c1a2370e 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c | |||
| @@ -59,7 +59,7 @@ int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n) | |||
| 59 | nfnl_unlock(); | 59 | nfnl_unlock(); |
| 60 | return -EBUSY; | 60 | return -EBUSY; |
| 61 | } | 61 | } |
| 62 | rcu_assign_pointer(subsys_table[n->subsys_id], n); | 62 | RCU_INIT_POINTER(subsys_table[n->subsys_id], n); |
| 63 | nfnl_unlock(); | 63 | nfnl_unlock(); |
| 64 | 64 | ||
| 65 | return 0; | 65 | return 0; |
| @@ -210,7 +210,7 @@ static int __net_init nfnetlink_net_init(struct net *net) | |||
| 210 | if (!nfnl) | 210 | if (!nfnl) |
| 211 | return -ENOMEM; | 211 | return -ENOMEM; |
| 212 | net->nfnl_stash = nfnl; | 212 | net->nfnl_stash = nfnl; |
| 213 | rcu_assign_pointer(net->nfnl, nfnl); | 213 | RCU_INIT_POINTER(net->nfnl, nfnl); |
| 214 | return 0; | 214 | return 0; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| @@ -219,7 +219,7 @@ static void __net_exit nfnetlink_net_exit_batch(struct list_head *net_exit_list) | |||
| 219 | struct net *net; | 219 | struct net *net; |
| 220 | 220 | ||
| 221 | list_for_each_entry(net, net_exit_list, exit_list) | 221 | list_for_each_entry(net, net_exit_list, exit_list) |
| 222 | rcu_assign_pointer(net->nfnl, NULL); | 222 | RCU_INIT_POINTER(net->nfnl, NULL); |
| 223 | synchronize_net(); | 223 | synchronize_net(); |
| 224 | list_for_each_entry(net, net_exit_list, exit_list) | 224 | list_for_each_entry(net, net_exit_list, exit_list) |
| 225 | netlink_kernel_release(net->nfnl_stash); | 225 | netlink_kernel_release(net->nfnl_stash); |
