diff options
55 files changed, 193 insertions, 193 deletions
diff --git a/net/802/garp.c b/net/802/garp.c index 16102951d36a..070bf4403bf8 100644 --- a/net/802/garp.c +++ b/net/802/garp.c | |||
@@ -553,7 +553,7 @@ static void garp_release_port(struct net_device *dev) | |||
553 | if (rtnl_dereference(port->applicants[i])) | 553 | if (rtnl_dereference(port->applicants[i])) |
554 | return; | 554 | return; |
555 | } | 555 | } |
556 | rcu_assign_pointer(dev->garp_port, NULL); | 556 | RCU_INIT_POINTER(dev->garp_port, NULL); |
557 | kfree_rcu(port, rcu); | 557 | kfree_rcu(port, rcu); |
558 | } | 558 | } |
559 | 559 | ||
@@ -605,7 +605,7 @@ void garp_uninit_applicant(struct net_device *dev, struct garp_application *appl | |||
605 | 605 | ||
606 | ASSERT_RTNL(); | 606 | ASSERT_RTNL(); |
607 | 607 | ||
608 | rcu_assign_pointer(port->applicants[appl->type], NULL); | 608 | RCU_INIT_POINTER(port->applicants[appl->type], NULL); |
609 | 609 | ||
610 | /* Delete timer and generate a final TRANSMIT_PDU event to flush out | 610 | /* Delete timer and generate a final TRANSMIT_PDU event to flush out |
611 | * all pending messages before the applicant is gone. */ | 611 | * all pending messages before the applicant is gone. */ |
diff --git a/net/802/stp.c b/net/802/stp.c index 978c30b1b36b..0e136ef1e4ba 100644 --- a/net/802/stp.c +++ b/net/802/stp.c | |||
@@ -88,9 +88,9 @@ void stp_proto_unregister(const struct stp_proto *proto) | |||
88 | { | 88 | { |
89 | mutex_lock(&stp_proto_mutex); | 89 | mutex_lock(&stp_proto_mutex); |
90 | if (is_zero_ether_addr(proto->group_address)) | 90 | if (is_zero_ether_addr(proto->group_address)) |
91 | rcu_assign_pointer(stp_proto, NULL); | 91 | RCU_INIT_POINTER(stp_proto, NULL); |
92 | else | 92 | else |
93 | rcu_assign_pointer(garp_protos[proto->group_address[5] - | 93 | RCU_INIT_POINTER(garp_protos[proto->group_address[5] - |
94 | GARP_ADDR_MIN], NULL); | 94 | GARP_ADDR_MIN], NULL); |
95 | synchronize_rcu(); | 95 | synchronize_rcu(); |
96 | 96 | ||
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 8970ba139d73..5471628d3ffe 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -133,7 +133,7 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head) | |||
133 | if (grp->nr_vlans == 0) { | 133 | if (grp->nr_vlans == 0) { |
134 | vlan_gvrp_uninit_applicant(real_dev); | 134 | vlan_gvrp_uninit_applicant(real_dev); |
135 | 135 | ||
136 | rcu_assign_pointer(real_dev->vlgrp, NULL); | 136 | RCU_INIT_POINTER(real_dev->vlgrp, NULL); |
137 | 137 | ||
138 | /* Free the group, after all cpu's are done. */ | 138 | /* Free the group, after all cpu's are done. */ |
139 | call_rcu(&grp->rcu, vlan_rcu_free); | 139 | call_rcu(&grp->rcu, vlan_rcu_free); |
diff --git a/net/bridge/netfilter/ebtable_broute.c b/net/bridge/netfilter/ebtable_broute.c index 1bcaf36ad612..40d8258bf74f 100644 --- a/net/bridge/netfilter/ebtable_broute.c +++ b/net/bridge/netfilter/ebtable_broute.c | |||
@@ -87,14 +87,14 @@ static int __init ebtable_broute_init(void) | |||
87 | if (ret < 0) | 87 | if (ret < 0) |
88 | return ret; | 88 | return ret; |
89 | /* see br_input.c */ | 89 | /* see br_input.c */ |
90 | rcu_assign_pointer(br_should_route_hook, | 90 | RCU_INIT_POINTER(br_should_route_hook, |
91 | (br_should_route_hook_t *)ebt_broute); | 91 | (br_should_route_hook_t *)ebt_broute); |
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
94 | 94 | ||
95 | static void __exit ebtable_broute_fini(void) | 95 | static void __exit ebtable_broute_fini(void) |
96 | { | 96 | { |
97 | rcu_assign_pointer(br_should_route_hook, NULL); | 97 | RCU_INIT_POINTER(br_should_route_hook, NULL); |
98 | synchronize_net(); | 98 | synchronize_net(); |
99 | unregister_pernet_subsys(&broute_net_ops); | 99 | unregister_pernet_subsys(&broute_net_ops); |
100 | } | 100 | } |
diff --git a/net/caif/cfmuxl.c b/net/caif/cfmuxl.c index c23979e79dfa..b36f24a4c8e7 100644 --- a/net/caif/cfmuxl.c +++ b/net/caif/cfmuxl.c | |||
@@ -108,7 +108,7 @@ struct cflayer *cfmuxl_remove_dnlayer(struct cflayer *layr, u8 phyid) | |||
108 | int idx = phyid % DN_CACHE_SIZE; | 108 | int idx = phyid % DN_CACHE_SIZE; |
109 | 109 | ||
110 | spin_lock_bh(&muxl->transmit_lock); | 110 | spin_lock_bh(&muxl->transmit_lock); |
111 | rcu_assign_pointer(muxl->dn_cache[idx], NULL); | 111 | RCU_INIT_POINTER(muxl->dn_cache[idx], NULL); |
112 | dn = get_from_id(&muxl->frml_list, phyid); | 112 | dn = get_from_id(&muxl->frml_list, phyid); |
113 | if (dn == NULL) | 113 | if (dn == NULL) |
114 | goto out; | 114 | goto out; |
@@ -164,7 +164,7 @@ struct cflayer *cfmuxl_remove_uplayer(struct cflayer *layr, u8 id) | |||
164 | if (up == NULL) | 164 | if (up == NULL) |
165 | goto out; | 165 | goto out; |
166 | 166 | ||
167 | rcu_assign_pointer(muxl->up_cache[idx], NULL); | 167 | RCU_INIT_POINTER(muxl->up_cache[idx], NULL); |
168 | list_del_rcu(&up->node); | 168 | list_del_rcu(&up->node); |
169 | out: | 169 | out: |
170 | spin_unlock_bh(&muxl->receive_lock); | 170 | spin_unlock_bh(&muxl->receive_lock); |
@@ -261,7 +261,7 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, | |||
261 | 261 | ||
262 | idx = layer->id % UP_CACHE_SIZE; | 262 | idx = layer->id % UP_CACHE_SIZE; |
263 | spin_lock_bh(&muxl->receive_lock); | 263 | spin_lock_bh(&muxl->receive_lock); |
264 | rcu_assign_pointer(muxl->up_cache[idx], NULL); | 264 | RCU_INIT_POINTER(muxl->up_cache[idx], NULL); |
265 | list_del_rcu(&layer->node); | 265 | list_del_rcu(&layer->node); |
266 | spin_unlock_bh(&muxl->receive_lock); | 266 | spin_unlock_bh(&muxl->receive_lock); |
267 | } | 267 | } |
diff --git a/net/can/af_can.c b/net/can/af_can.c index 8ce926d3b2cb..b9efa944cab9 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c | |||
@@ -719,7 +719,7 @@ int can_proto_register(const struct can_proto *cp) | |||
719 | proto); | 719 | proto); |
720 | err = -EBUSY; | 720 | err = -EBUSY; |
721 | } else | 721 | } else |
722 | rcu_assign_pointer(proto_tab[proto], cp); | 722 | RCU_INIT_POINTER(proto_tab[proto], cp); |
723 | 723 | ||
724 | mutex_unlock(&proto_tab_lock); | 724 | mutex_unlock(&proto_tab_lock); |
725 | 725 | ||
@@ -740,7 +740,7 @@ void can_proto_unregister(const struct can_proto *cp) | |||
740 | 740 | ||
741 | mutex_lock(&proto_tab_lock); | 741 | mutex_lock(&proto_tab_lock); |
742 | BUG_ON(proto_tab[proto] != cp); | 742 | BUG_ON(proto_tab[proto] != cp); |
743 | rcu_assign_pointer(proto_tab[proto], NULL); | 743 | RCU_INIT_POINTER(proto_tab[proto], NULL); |
744 | mutex_unlock(&proto_tab_lock); | 744 | mutex_unlock(&proto_tab_lock); |
745 | 745 | ||
746 | synchronize_rcu(); | 746 | synchronize_rcu(); |
diff --git a/net/core/dev.c b/net/core/dev.c index 17d67b579beb..9428766d0140 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3094,8 +3094,8 @@ void netdev_rx_handler_unregister(struct net_device *dev) | |||
3094 | { | 3094 | { |
3095 | 3095 | ||
3096 | ASSERT_RTNL(); | 3096 | ASSERT_RTNL(); |
3097 | rcu_assign_pointer(dev->rx_handler, NULL); | 3097 | RCU_INIT_POINTER(dev->rx_handler, NULL); |
3098 | rcu_assign_pointer(dev->rx_handler_data, NULL); | 3098 | RCU_INIT_POINTER(dev->rx_handler_data, NULL); |
3099 | } | 3099 | } |
3100 | EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); | 3100 | EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); |
3101 | 3101 | ||
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index e7ab0c0285b5..0657b57df558 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -487,7 +487,7 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
487 | if (ops->nr_goto_rules > 0) { | 487 | if (ops->nr_goto_rules > 0) { |
488 | list_for_each_entry(tmp, &ops->rules_list, list) { | 488 | list_for_each_entry(tmp, &ops->rules_list, list) { |
489 | if (rtnl_dereference(tmp->ctarget) == rule) { | 489 | if (rtnl_dereference(tmp->ctarget) == rule) { |
490 | rcu_assign_pointer(tmp->ctarget, NULL); | 490 | RCU_INIT_POINTER(tmp->ctarget, NULL); |
491 | ops->unresolved_rules++; | 491 | ops->unresolved_rules++; |
492 | } | 492 | } |
493 | } | 493 | } |
diff --git a/net/core/filter.c b/net/core/filter.c index 36f975fa87cb..8fcc2d776e09 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -645,7 +645,7 @@ int sk_detach_filter(struct sock *sk) | |||
645 | filter = rcu_dereference_protected(sk->sk_filter, | 645 | filter = rcu_dereference_protected(sk->sk_filter, |
646 | sock_owned_by_user(sk)); | 646 | sock_owned_by_user(sk)); |
647 | if (filter) { | 647 | if (filter) { |
648 | rcu_assign_pointer(sk->sk_filter, NULL); | 648 | RCU_INIT_POINTER(sk->sk_filter, NULL); |
649 | sk_filter_uncharge(sk, filter); | 649 | sk_filter_uncharge(sk, filter); |
650 | ret = 0; | 650 | ret = 0; |
651 | } | 651 | } |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 1683e5db2f27..b1ab887520a8 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -987,10 +987,10 @@ static ssize_t store_xps_map(struct netdev_queue *queue, | |||
987 | } | 987 | } |
988 | 988 | ||
989 | if (nonempty) | 989 | if (nonempty) |
990 | rcu_assign_pointer(dev->xps_maps, new_dev_maps); | 990 | RCU_INIT_POINTER(dev->xps_maps, new_dev_maps); |
991 | else { | 991 | else { |
992 | kfree(new_dev_maps); | 992 | kfree(new_dev_maps); |
993 | rcu_assign_pointer(dev->xps_maps, NULL); | 993 | RCU_INIT_POINTER(dev->xps_maps, NULL); |
994 | } | 994 | } |
995 | 995 | ||
996 | if (dev_maps) | 996 | if (dev_maps) |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index adf84dd8c7b5..d676a561d983 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -760,7 +760,7 @@ int __netpoll_setup(struct netpoll *np) | |||
760 | } | 760 | } |
761 | 761 | ||
762 | /* last thing to do is link it to the net device structure */ | 762 | /* last thing to do is link it to the net device structure */ |
763 | rcu_assign_pointer(ndev->npinfo, npinfo); | 763 | RCU_INIT_POINTER(ndev->npinfo, npinfo); |
764 | 764 | ||
765 | return 0; | 765 | return 0; |
766 | 766 | ||
@@ -901,7 +901,7 @@ void __netpoll_cleanup(struct netpoll *np) | |||
901 | if (ops->ndo_netpoll_cleanup) | 901 | if (ops->ndo_netpoll_cleanup) |
902 | ops->ndo_netpoll_cleanup(np->dev); | 902 | ops->ndo_netpoll_cleanup(np->dev); |
903 | 903 | ||
904 | rcu_assign_pointer(np->dev->npinfo, NULL); | 904 | RCU_INIT_POINTER(np->dev->npinfo, NULL); |
905 | 905 | ||
906 | /* avoid racing with NAPI reading npinfo */ | 906 | /* avoid racing with NAPI reading npinfo */ |
907 | synchronize_rcu_bh(); | 907 | synchronize_rcu_bh(); |
diff --git a/net/core/sock.c b/net/core/sock.c index bc745d00ea4d..9997026b44b2 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -387,7 +387,7 @@ struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) | |||
387 | 387 | ||
388 | if (dst && dst->obsolete && dst->ops->check(dst, cookie) == NULL) { | 388 | if (dst && dst->obsolete && dst->ops->check(dst, cookie) == NULL) { |
389 | sk_tx_queue_clear(sk); | 389 | sk_tx_queue_clear(sk); |
390 | rcu_assign_pointer(sk->sk_dst_cache, NULL); | 390 | RCU_INIT_POINTER(sk->sk_dst_cache, NULL); |
391 | dst_release(dst); | 391 | dst_release(dst); |
392 | return NULL; | 392 | return NULL; |
393 | } | 393 | } |
@@ -1158,7 +1158,7 @@ static void __sk_free(struct sock *sk) | |||
1158 | atomic_read(&sk->sk_wmem_alloc) == 0); | 1158 | atomic_read(&sk->sk_wmem_alloc) == 0); |
1159 | if (filter) { | 1159 | if (filter) { |
1160 | sk_filter_uncharge(sk, filter); | 1160 | sk_filter_uncharge(sk, filter); |
1161 | rcu_assign_pointer(sk->sk_filter, NULL); | 1161 | RCU_INIT_POINTER(sk->sk_filter, NULL); |
1162 | } | 1162 | } |
1163 | 1163 | ||
1164 | sock_disable_timestamp(sk, SOCK_TIMESTAMP); | 1164 | sock_disable_timestamp(sk, SOCK_TIMESTAMP); |
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index ba4faceec405..2ab16e12520c 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -388,7 +388,7 @@ static int dn_dev_insert_ifa(struct dn_dev *dn_db, struct dn_ifaddr *ifa) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | ifa->ifa_next = dn_db->ifa_list; | 390 | ifa->ifa_next = dn_db->ifa_list; |
391 | rcu_assign_pointer(dn_db->ifa_list, ifa); | 391 | RCU_INIT_POINTER(dn_db->ifa_list, ifa); |
392 | 392 | ||
393 | dn_ifaddr_notify(RTM_NEWADDR, ifa); | 393 | dn_ifaddr_notify(RTM_NEWADDR, ifa); |
394 | blocking_notifier_call_chain(&dnaddr_chain, NETDEV_UP, ifa); | 394 | blocking_notifier_call_chain(&dnaddr_chain, NETDEV_UP, ifa); |
@@ -1093,7 +1093,7 @@ static struct dn_dev *dn_dev_create(struct net_device *dev, int *err) | |||
1093 | 1093 | ||
1094 | memcpy(&dn_db->parms, p, sizeof(struct dn_dev_parms)); | 1094 | memcpy(&dn_db->parms, p, sizeof(struct dn_dev_parms)); |
1095 | 1095 | ||
1096 | rcu_assign_pointer(dev->dn_ptr, dn_db); | 1096 | RCU_INIT_POINTER(dev->dn_ptr, dn_db); |
1097 | dn_db->dev = dev; | 1097 | dn_db->dev = dev; |
1098 | init_timer(&dn_db->timer); | 1098 | init_timer(&dn_db->timer); |
1099 | 1099 | ||
@@ -1101,7 +1101,7 @@ static struct dn_dev *dn_dev_create(struct net_device *dev, int *err) | |||
1101 | 1101 | ||
1102 | dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table); | 1102 | dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table); |
1103 | if (!dn_db->neigh_parms) { | 1103 | if (!dn_db->neigh_parms) { |
1104 | rcu_assign_pointer(dev->dn_ptr, NULL); | 1104 | RCU_INIT_POINTER(dev->dn_ptr, NULL); |
1105 | kfree(dn_db); | 1105 | kfree(dn_db); |
1106 | return NULL; | 1106 | return NULL; |
1107 | } | 1107 | } |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index bc19bd06dd00..c6b5092f29a1 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -258,7 +258,7 @@ static struct in_device *inetdev_init(struct net_device *dev) | |||
258 | ip_mc_up(in_dev); | 258 | ip_mc_up(in_dev); |
259 | 259 | ||
260 | /* we can receive as soon as ip_ptr is set -- do this last */ | 260 | /* we can receive as soon as ip_ptr is set -- do this last */ |
261 | rcu_assign_pointer(dev->ip_ptr, in_dev); | 261 | RCU_INIT_POINTER(dev->ip_ptr, in_dev); |
262 | out: | 262 | out: |
263 | return in_dev; | 263 | return in_dev; |
264 | out_kfree: | 264 | out_kfree: |
@@ -291,7 +291,7 @@ static void inetdev_destroy(struct in_device *in_dev) | |||
291 | inet_free_ifa(ifa); | 291 | inet_free_ifa(ifa); |
292 | } | 292 | } |
293 | 293 | ||
294 | rcu_assign_pointer(dev->ip_ptr, NULL); | 294 | RCU_INIT_POINTER(dev->ip_ptr, NULL); |
295 | 295 | ||
296 | devinet_sysctl_unregister(in_dev); | 296 | devinet_sysctl_unregister(in_dev); |
297 | neigh_parms_release(&arp_tbl, in_dev->arp_parms); | 297 | neigh_parms_release(&arp_tbl, in_dev->arp_parms); |
@@ -1175,7 +1175,7 @@ static int inetdev_event(struct notifier_block *this, unsigned long event, | |||
1175 | switch (event) { | 1175 | switch (event) { |
1176 | case NETDEV_REGISTER: | 1176 | case NETDEV_REGISTER: |
1177 | printk(KERN_DEBUG "inetdev_event: bug\n"); | 1177 | printk(KERN_DEBUG "inetdev_event: bug\n"); |
1178 | rcu_assign_pointer(dev->ip_ptr, NULL); | 1178 | RCU_INIT_POINTER(dev->ip_ptr, NULL); |
1179 | break; | 1179 | break; |
1180 | case NETDEV_UP: | 1180 | case NETDEV_UP: |
1181 | if (!inetdev_valid_mtu(dev->mtu)) | 1181 | if (!inetdev_valid_mtu(dev->mtu)) |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index de9e2978476f..89d6f71a6a99 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -204,7 +204,7 @@ static inline struct tnode *node_parent_rcu(const struct rt_trie_node *node) | |||
204 | return (struct tnode *)(parent & ~NODE_TYPE_MASK); | 204 | return (struct tnode *)(parent & ~NODE_TYPE_MASK); |
205 | } | 205 | } |
206 | 206 | ||
207 | /* Same as rcu_assign_pointer | 207 | /* Same as RCU_INIT_POINTER |
208 | * but that macro() assumes that value is a pointer. | 208 | * but that macro() assumes that value is a pointer. |
209 | */ | 209 | */ |
210 | static inline void node_set_parent(struct rt_trie_node *node, struct tnode *ptr) | 210 | static inline void node_set_parent(struct rt_trie_node *node, struct tnode *ptr) |
@@ -528,7 +528,7 @@ static void tnode_put_child_reorg(struct tnode *tn, int i, struct rt_trie_node * | |||
528 | if (n) | 528 | if (n) |
529 | node_set_parent(n, tn); | 529 | node_set_parent(n, tn); |
530 | 530 | ||
531 | rcu_assign_pointer(tn->child[i], n); | 531 | RCU_INIT_POINTER(tn->child[i], n); |
532 | } | 532 | } |
533 | 533 | ||
534 | #define MAX_WORK 10 | 534 | #define MAX_WORK 10 |
@@ -1014,7 +1014,7 @@ static void trie_rebalance(struct trie *t, struct tnode *tn) | |||
1014 | 1014 | ||
1015 | tp = node_parent((struct rt_trie_node *) tn); | 1015 | tp = node_parent((struct rt_trie_node *) tn); |
1016 | if (!tp) | 1016 | if (!tp) |
1017 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | 1017 | RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); |
1018 | 1018 | ||
1019 | tnode_free_flush(); | 1019 | tnode_free_flush(); |
1020 | if (!tp) | 1020 | if (!tp) |
@@ -1026,7 +1026,7 @@ static void trie_rebalance(struct trie *t, struct tnode *tn) | |||
1026 | if (IS_TNODE(tn)) | 1026 | if (IS_TNODE(tn)) |
1027 | tn = (struct tnode *)resize(t, (struct tnode *)tn); | 1027 | tn = (struct tnode *)resize(t, (struct tnode *)tn); |
1028 | 1028 | ||
1029 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | 1029 | RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); |
1030 | tnode_free_flush(); | 1030 | tnode_free_flush(); |
1031 | } | 1031 | } |
1032 | 1032 | ||
@@ -1163,7 +1163,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen) | |||
1163 | put_child(t, (struct tnode *)tp, cindex, | 1163 | put_child(t, (struct tnode *)tp, cindex, |
1164 | (struct rt_trie_node *)tn); | 1164 | (struct rt_trie_node *)tn); |
1165 | } else { | 1165 | } else { |
1166 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | 1166 | RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); |
1167 | tp = tn; | 1167 | tp = tn; |
1168 | } | 1168 | } |
1169 | } | 1169 | } |
@@ -1621,7 +1621,7 @@ static void trie_leaf_remove(struct trie *t, struct leaf *l) | |||
1621 | put_child(t, (struct tnode *)tp, cindex, NULL); | 1621 | put_child(t, (struct tnode *)tp, cindex, NULL); |
1622 | trie_rebalance(t, tp); | 1622 | trie_rebalance(t, tp); |
1623 | } else | 1623 | } else |
1624 | rcu_assign_pointer(t->trie, NULL); | 1624 | RCU_INIT_POINTER(t->trie, NULL); |
1625 | 1625 | ||
1626 | free_leaf(l); | 1626 | free_leaf(l); |
1627 | } | 1627 | } |
diff --git a/net/ipv4/gre.c b/net/ipv4/gre.c index dbfc21de3479..8cb1ebb7cd74 100644 --- a/net/ipv4/gre.c +++ b/net/ipv4/gre.c | |||
@@ -34,7 +34,7 @@ int gre_add_protocol(const struct gre_protocol *proto, u8 version) | |||
34 | if (gre_proto[version]) | 34 | if (gre_proto[version]) |
35 | goto err_out_unlock; | 35 | goto err_out_unlock; |
36 | 36 | ||
37 | rcu_assign_pointer(gre_proto[version], proto); | 37 | RCU_INIT_POINTER(gre_proto[version], proto); |
38 | spin_unlock(&gre_proto_lock); | 38 | spin_unlock(&gre_proto_lock); |
39 | return 0; | 39 | return 0; |
40 | 40 | ||
@@ -54,7 +54,7 @@ int gre_del_protocol(const struct gre_protocol *proto, u8 version) | |||
54 | if (rcu_dereference_protected(gre_proto[version], | 54 | if (rcu_dereference_protected(gre_proto[version], |
55 | lockdep_is_held(&gre_proto_lock)) != proto) | 55 | lockdep_is_held(&gre_proto_lock)) != proto) |
56 | goto err_out_unlock; | 56 | goto err_out_unlock; |
57 | rcu_assign_pointer(gre_proto[version], NULL); | 57 | RCU_INIT_POINTER(gre_proto[version], NULL); |
58 | spin_unlock(&gre_proto_lock); | 58 | spin_unlock(&gre_proto_lock); |
59 | synchronize_rcu(); | 59 | synchronize_rcu(); |
60 | return 0; | 60 | return 0; |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index f1d27f6c9351..83532d22129f 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1242,7 +1242,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) | |||
1242 | 1242 | ||
1243 | im->next_rcu = in_dev->mc_list; | 1243 | im->next_rcu = in_dev->mc_list; |
1244 | in_dev->mc_count++; | 1244 | in_dev->mc_count++; |
1245 | rcu_assign_pointer(in_dev->mc_list, im); | 1245 | RCU_INIT_POINTER(in_dev->mc_list, im); |
1246 | 1246 | ||
1247 | #ifdef CONFIG_IP_MULTICAST | 1247 | #ifdef CONFIG_IP_MULTICAST |
1248 | igmpv3_del_delrec(in_dev, im->multiaddr); | 1248 | igmpv3_del_delrec(in_dev, im->multiaddr); |
@@ -1813,7 +1813,7 @@ int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr) | |||
1813 | iml->next_rcu = inet->mc_list; | 1813 | iml->next_rcu = inet->mc_list; |
1814 | iml->sflist = NULL; | 1814 | iml->sflist = NULL; |
1815 | iml->sfmode = MCAST_EXCLUDE; | 1815 | iml->sfmode = MCAST_EXCLUDE; |
1816 | rcu_assign_pointer(inet->mc_list, iml); | 1816 | RCU_INIT_POINTER(inet->mc_list, iml); |
1817 | ip_mc_inc_group(in_dev, addr); | 1817 | ip_mc_inc_group(in_dev, addr); |
1818 | err = 0; | 1818 | err = 0; |
1819 | done: | 1819 | done: |
@@ -1835,7 +1835,7 @@ static int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml, | |||
1835 | } | 1835 | } |
1836 | err = ip_mc_del_src(in_dev, &iml->multi.imr_multiaddr.s_addr, | 1836 | err = ip_mc_del_src(in_dev, &iml->multi.imr_multiaddr.s_addr, |
1837 | iml->sfmode, psf->sl_count, psf->sl_addr, 0); | 1837 | iml->sfmode, psf->sl_count, psf->sl_addr, 0); |
1838 | rcu_assign_pointer(iml->sflist, NULL); | 1838 | RCU_INIT_POINTER(iml->sflist, NULL); |
1839 | /* decrease mem now to avoid the memleak warning */ | 1839 | /* decrease mem now to avoid the memleak warning */ |
1840 | atomic_sub(IP_SFLSIZE(psf->sl_max), &sk->sk_omem_alloc); | 1840 | atomic_sub(IP_SFLSIZE(psf->sl_max), &sk->sk_omem_alloc); |
1841 | kfree_rcu(psf, rcu); | 1841 | kfree_rcu(psf, rcu); |
@@ -2000,7 +2000,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct | |||
2000 | atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); | 2000 | atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); |
2001 | kfree_rcu(psl, rcu); | 2001 | kfree_rcu(psl, rcu); |
2002 | } | 2002 | } |
2003 | rcu_assign_pointer(pmc->sflist, newpsl); | 2003 | RCU_INIT_POINTER(pmc->sflist, newpsl); |
2004 | psl = newpsl; | 2004 | psl = newpsl; |
2005 | } | 2005 | } |
2006 | rv = 1; /* > 0 for insert logic below if sl_count is 0 */ | 2006 | rv = 1; /* > 0 for insert logic below if sl_count is 0 */ |
@@ -2103,7 +2103,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) | |||
2103 | } else | 2103 | } else |
2104 | (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, | 2104 | (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, |
2105 | 0, NULL, 0); | 2105 | 0, NULL, 0); |
2106 | rcu_assign_pointer(pmc->sflist, newpsl); | 2106 | RCU_INIT_POINTER(pmc->sflist, newpsl); |
2107 | pmc->sfmode = msf->imsf_fmode; | 2107 | pmc->sfmode = msf->imsf_fmode; |
2108 | err = 0; | 2108 | err = 0; |
2109 | done: | 2109 | done: |
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 378b20b7ca6e..065effd8349a 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -231,7 +231,7 @@ static void ipip_tunnel_unlink(struct ipip_net *ipn, struct ip_tunnel *t) | |||
231 | (iter = rtnl_dereference(*tp)) != NULL; | 231 | (iter = rtnl_dereference(*tp)) != NULL; |
232 | tp = &iter->next) { | 232 | tp = &iter->next) { |
233 | if (t == iter) { | 233 | if (t == iter) { |
234 | rcu_assign_pointer(*tp, t->next); | 234 | RCU_INIT_POINTER(*tp, t->next); |
235 | break; | 235 | break; |
236 | } | 236 | } |
237 | } | 237 | } |
@@ -241,8 +241,8 @@ static void ipip_tunnel_link(struct ipip_net *ipn, struct ip_tunnel *t) | |||
241 | { | 241 | { |
242 | struct ip_tunnel __rcu **tp = ipip_bucket(ipn, t); | 242 | struct ip_tunnel __rcu **tp = ipip_bucket(ipn, t); |
243 | 243 | ||
244 | rcu_assign_pointer(t->next, rtnl_dereference(*tp)); | 244 | RCU_INIT_POINTER(t->next, rtnl_dereference(*tp)); |
245 | rcu_assign_pointer(*tp, t); | 245 | RCU_INIT_POINTER(*tp, t); |
246 | } | 246 | } |
247 | 247 | ||
248 | static struct ip_tunnel * ipip_tunnel_locate(struct net *net, | 248 | static struct ip_tunnel * ipip_tunnel_locate(struct net *net, |
@@ -301,7 +301,7 @@ static void ipip_tunnel_uninit(struct net_device *dev) | |||
301 | struct ipip_net *ipn = net_generic(net, ipip_net_id); | 301 | struct ipip_net *ipn = net_generic(net, ipip_net_id); |
302 | 302 | ||
303 | if (dev == ipn->fb_tunnel_dev) | 303 | if (dev == ipn->fb_tunnel_dev) |
304 | rcu_assign_pointer(ipn->tunnels_wc[0], NULL); | 304 | RCU_INIT_POINTER(ipn->tunnels_wc[0], NULL); |
305 | else | 305 | else |
306 | ipip_tunnel_unlink(ipn, netdev_priv(dev)); | 306 | ipip_tunnel_unlink(ipn, netdev_priv(dev)); |
307 | dev_put(dev); | 307 | dev_put(dev); |
@@ -791,7 +791,7 @@ static int __net_init ipip_fb_tunnel_init(struct net_device *dev) | |||
791 | return -ENOMEM; | 791 | return -ENOMEM; |
792 | 792 | ||
793 | dev_hold(dev); | 793 | dev_hold(dev); |
794 | rcu_assign_pointer(ipn->tunnels_wc[0], tunnel); | 794 | RCU_INIT_POINTER(ipn->tunnels_wc[0], tunnel); |
795 | return 0; | 795 | return 0; |
796 | } | 796 | } |
797 | 797 | ||
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 58e879157976..f550285c977b 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1176,7 +1176,7 @@ static void mrtsock_destruct(struct sock *sk) | |||
1176 | ipmr_for_each_table(mrt, net) { | 1176 | ipmr_for_each_table(mrt, net) { |
1177 | if (sk == rtnl_dereference(mrt->mroute_sk)) { | 1177 | if (sk == rtnl_dereference(mrt->mroute_sk)) { |
1178 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)--; | 1178 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)--; |
1179 | rcu_assign_pointer(mrt->mroute_sk, NULL); | 1179 | RCU_INIT_POINTER(mrt->mroute_sk, NULL); |
1180 | mroute_clean_tables(mrt); | 1180 | mroute_clean_tables(mrt); |
1181 | } | 1181 | } |
1182 | } | 1182 | } |
@@ -1224,7 +1224,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsi | |||
1224 | 1224 | ||
1225 | ret = ip_ra_control(sk, 1, mrtsock_destruct); | 1225 | ret = ip_ra_control(sk, 1, mrtsock_destruct); |
1226 | if (ret == 0) { | 1226 | if (ret == 0) { |
1227 | rcu_assign_pointer(mrt->mroute_sk, sk); | 1227 | RCU_INIT_POINTER(mrt->mroute_sk, sk); |
1228 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)++; | 1228 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)++; |
1229 | } | 1229 | } |
1230 | rtnl_unlock(); | 1230 | rtnl_unlock(); |
diff --git a/net/ipv4/netfilter/nf_nat_amanda.c b/net/ipv4/netfilter/nf_nat_amanda.c index 703f366fd235..7b22382ff0e9 100644 --- a/net/ipv4/netfilter/nf_nat_amanda.c +++ b/net/ipv4/netfilter/nf_nat_amanda.c | |||
@@ -70,14 +70,14 @@ static unsigned int help(struct sk_buff *skb, | |||
70 | 70 | ||
71 | static void __exit nf_nat_amanda_fini(void) | 71 | static void __exit nf_nat_amanda_fini(void) |
72 | { | 72 | { |
73 | rcu_assign_pointer(nf_nat_amanda_hook, NULL); | 73 | RCU_INIT_POINTER(nf_nat_amanda_hook, NULL); |
74 | synchronize_rcu(); | 74 | synchronize_rcu(); |
75 | } | 75 | } |
76 | 76 | ||
77 | static int __init nf_nat_amanda_init(void) | 77 | static int __init nf_nat_amanda_init(void) |
78 | { | 78 | { |
79 | BUG_ON(nf_nat_amanda_hook != NULL); | 79 | BUG_ON(nf_nat_amanda_hook != NULL); |
80 | rcu_assign_pointer(nf_nat_amanda_hook, help); | 80 | RCU_INIT_POINTER(nf_nat_amanda_hook, help); |
81 | return 0; | 81 | return 0; |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index 3346de5d94d0..447bc5cfdc6c 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
@@ -514,7 +514,7 @@ int nf_nat_protocol_register(const struct nf_nat_protocol *proto) | |||
514 | ret = -EBUSY; | 514 | ret = -EBUSY; |
515 | goto out; | 515 | goto out; |
516 | } | 516 | } |
517 | rcu_assign_pointer(nf_nat_protos[proto->protonum], proto); | 517 | RCU_INIT_POINTER(nf_nat_protos[proto->protonum], proto); |
518 | out: | 518 | out: |
519 | spin_unlock_bh(&nf_nat_lock); | 519 | spin_unlock_bh(&nf_nat_lock); |
520 | return ret; | 520 | return ret; |
@@ -525,7 +525,7 @@ EXPORT_SYMBOL(nf_nat_protocol_register); | |||
525 | void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto) | 525 | void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto) |
526 | { | 526 | { |
527 | spin_lock_bh(&nf_nat_lock); | 527 | spin_lock_bh(&nf_nat_lock); |
528 | rcu_assign_pointer(nf_nat_protos[proto->protonum], | 528 | RCU_INIT_POINTER(nf_nat_protos[proto->protonum], |
529 | &nf_nat_unknown_protocol); | 529 | &nf_nat_unknown_protocol); |
530 | spin_unlock_bh(&nf_nat_lock); | 530 | spin_unlock_bh(&nf_nat_lock); |
531 | synchronize_rcu(); | 531 | synchronize_rcu(); |
@@ -736,10 +736,10 @@ static int __init nf_nat_init(void) | |||
736 | /* Sew in builtin protocols. */ | 736 | /* Sew in builtin protocols. */ |
737 | spin_lock_bh(&nf_nat_lock); | 737 | spin_lock_bh(&nf_nat_lock); |
738 | for (i = 0; i < MAX_IP_NAT_PROTO; i++) | 738 | for (i = 0; i < MAX_IP_NAT_PROTO; i++) |
739 | rcu_assign_pointer(nf_nat_protos[i], &nf_nat_unknown_protocol); | 739 | RCU_INIT_POINTER(nf_nat_protos[i], &nf_nat_unknown_protocol); |
740 | rcu_assign_pointer(nf_nat_protos[IPPROTO_TCP], &nf_nat_protocol_tcp); | 740 | RCU_INIT_POINTER(nf_nat_protos[IPPROTO_TCP], &nf_nat_protocol_tcp); |
741 | rcu_assign_pointer(nf_nat_protos[IPPROTO_UDP], &nf_nat_protocol_udp); | 741 | RCU_INIT_POINTER(nf_nat_protos[IPPROTO_UDP], &nf_nat_protocol_udp); |
742 | rcu_assign_pointer(nf_nat_protos[IPPROTO_ICMP], &nf_nat_protocol_icmp); | 742 | RCU_INIT_POINTER(nf_nat_protos[IPPROTO_ICMP], &nf_nat_protocol_icmp); |
743 | spin_unlock_bh(&nf_nat_lock); | 743 | spin_unlock_bh(&nf_nat_lock); |
744 | 744 | ||
745 | /* Initialize fake conntrack so that NAT will skip it */ | 745 | /* Initialize fake conntrack so that NAT will skip it */ |
@@ -748,12 +748,12 @@ static int __init nf_nat_init(void) | |||
748 | l3proto = nf_ct_l3proto_find_get((u_int16_t)AF_INET); | 748 | l3proto = nf_ct_l3proto_find_get((u_int16_t)AF_INET); |
749 | 749 | ||
750 | BUG_ON(nf_nat_seq_adjust_hook != NULL); | 750 | BUG_ON(nf_nat_seq_adjust_hook != NULL); |
751 | rcu_assign_pointer(nf_nat_seq_adjust_hook, nf_nat_seq_adjust); | 751 | RCU_INIT_POINTER(nf_nat_seq_adjust_hook, nf_nat_seq_adjust); |
752 | BUG_ON(nfnetlink_parse_nat_setup_hook != NULL); | 752 | BUG_ON(nfnetlink_parse_nat_setup_hook != NULL); |
753 | rcu_assign_pointer(nfnetlink_parse_nat_setup_hook, | 753 | RCU_INIT_POINTER(nfnetlink_parse_nat_setup_hook, |
754 | nfnetlink_parse_nat_setup); | 754 | nfnetlink_parse_nat_setup); |
755 | BUG_ON(nf_ct_nat_offset != NULL); | 755 | BUG_ON(nf_ct_nat_offset != NULL); |
756 | rcu_assign_pointer(nf_ct_nat_offset, nf_nat_get_offset); | 756 | RCU_INIT_POINTER(nf_ct_nat_offset, nf_nat_get_offset); |
757 | return 0; | 757 | return 0; |
758 | 758 | ||
759 | cleanup_extend: | 759 | cleanup_extend: |
@@ -766,9 +766,9 @@ static void __exit nf_nat_cleanup(void) | |||
766 | unregister_pernet_subsys(&nf_nat_net_ops); | 766 | unregister_pernet_subsys(&nf_nat_net_ops); |
767 | nf_ct_l3proto_put(l3proto); | 767 | nf_ct_l3proto_put(l3proto); |
768 | nf_ct_extend_unregister(&nat_extend); | 768 | nf_ct_extend_unregister(&nat_extend); |
769 | rcu_assign_pointer(nf_nat_seq_adjust_hook, NULL); | 769 | RCU_INIT_POINTER(nf_nat_seq_adjust_hook, NULL); |
770 | rcu_assign_pointer(nfnetlink_parse_nat_setup_hook, NULL); | 770 | RCU_INIT_POINTER(nfnetlink_parse_nat_setup_hook, NULL); |
771 | rcu_assign_pointer(nf_ct_nat_offset, NULL); | 771 | RCU_INIT_POINTER(nf_ct_nat_offset, NULL); |
772 | synchronize_net(); | 772 | synchronize_net(); |
773 | } | 773 | } |
774 | 774 | ||
diff --git a/net/ipv4/netfilter/nf_nat_ftp.c b/net/ipv4/netfilter/nf_nat_ftp.c index dc73abb3fe27..e462a957d080 100644 --- a/net/ipv4/netfilter/nf_nat_ftp.c +++ b/net/ipv4/netfilter/nf_nat_ftp.c | |||
@@ -113,14 +113,14 @@ out: | |||
113 | 113 | ||
114 | static void __exit nf_nat_ftp_fini(void) | 114 | static void __exit nf_nat_ftp_fini(void) |
115 | { | 115 | { |
116 | rcu_assign_pointer(nf_nat_ftp_hook, NULL); | 116 | RCU_INIT_POINTER(nf_nat_ftp_hook, NULL); |
117 | synchronize_rcu(); | 117 | synchronize_rcu(); |
118 | } | 118 | } |
119 | 119 | ||
120 | static int __init nf_nat_ftp_init(void) | 120 | static int __init nf_nat_ftp_init(void) |
121 | { | 121 | { |
122 | BUG_ON(nf_nat_ftp_hook != NULL); | 122 | BUG_ON(nf_nat_ftp_hook != NULL); |
123 | rcu_assign_pointer(nf_nat_ftp_hook, nf_nat_ftp); | 123 | RCU_INIT_POINTER(nf_nat_ftp_hook, nf_nat_ftp); |
124 | return 0; | 124 | return 0; |
125 | } | 125 | } |
126 | 126 | ||
diff --git a/net/ipv4/netfilter/nf_nat_h323.c b/net/ipv4/netfilter/nf_nat_h323.c index 790f3160e012..b9a1136addbd 100644 --- a/net/ipv4/netfilter/nf_nat_h323.c +++ b/net/ipv4/netfilter/nf_nat_h323.c | |||
@@ -581,30 +581,30 @@ static int __init init(void) | |||
581 | BUG_ON(nat_callforwarding_hook != NULL); | 581 | BUG_ON(nat_callforwarding_hook != NULL); |
582 | BUG_ON(nat_q931_hook != NULL); | 582 | BUG_ON(nat_q931_hook != NULL); |
583 | 583 | ||
584 | rcu_assign_pointer(set_h245_addr_hook, set_h245_addr); | 584 | RCU_INIT_POINTER(set_h245_addr_hook, set_h245_addr); |
585 | rcu_assign_pointer(set_h225_addr_hook, set_h225_addr); | 585 | RCU_INIT_POINTER(set_h225_addr_hook, set_h225_addr); |
586 | rcu_assign_pointer(set_sig_addr_hook, set_sig_addr); | 586 | RCU_INIT_POINTER(set_sig_addr_hook, set_sig_addr); |
587 | rcu_assign_pointer(set_ras_addr_hook, set_ras_addr); | 587 | RCU_INIT_POINTER(set_ras_addr_hook, set_ras_addr); |
588 | rcu_assign_pointer(nat_rtp_rtcp_hook, nat_rtp_rtcp); | 588 | RCU_INIT_POINTER(nat_rtp_rtcp_hook, nat_rtp_rtcp); |
589 | rcu_assign_pointer(nat_t120_hook, nat_t120); | 589 | RCU_INIT_POINTER(nat_t120_hook, nat_t120); |
590 | rcu_assign_pointer(nat_h245_hook, nat_h245); | 590 | RCU_INIT_POINTER(nat_h245_hook, nat_h245); |
591 | rcu_assign_pointer(nat_callforwarding_hook, nat_callforwarding); | 591 | RCU_INIT_POINTER(nat_callforwarding_hook, nat_callforwarding); |
592 | rcu_assign_pointer(nat_q931_hook, nat_q931); | 592 | RCU_INIT_POINTER(nat_q931_hook, nat_q931); |
593 | return 0; | 593 | return 0; |
594 | } | 594 | } |
595 | 595 | ||
596 | /****************************************************************************/ | 596 | /****************************************************************************/ |
597 | static void __exit fini(void) | 597 | static void __exit fini(void) |
598 | { | 598 | { |
599 | rcu_assign_pointer(set_h245_addr_hook, NULL); | 599 | RCU_INIT_POINTER(set_h245_addr_hook, NULL); |
600 | rcu_assign_pointer(set_h225_addr_hook, NULL); | 600 | RCU_INIT_POINTER(set_h225_addr_hook, NULL); |
601 | rcu_assign_pointer(set_sig_addr_hook, NULL); | 601 | RCU_INIT_POINTER(set_sig_addr_hook, NULL); |
602 | rcu_assign_pointer(set_ras_addr_hook, NULL); | 602 | RCU_INIT_POINTER(set_ras_addr_hook, NULL); |
603 | rcu_assign_pointer(nat_rtp_rtcp_hook, NULL); | 603 | RCU_INIT_POINTER(nat_rtp_rtcp_hook, NULL); |
604 | rcu_assign_pointer(nat_t120_hook, NULL); | 604 | RCU_INIT_POINTER(nat_t120_hook, NULL); |
605 | rcu_assign_pointer(nat_h245_hook, NULL); | 605 | RCU_INIT_POINTER(nat_h245_hook, NULL); |
606 | rcu_assign_pointer(nat_callforwarding_hook, NULL); | 606 | RCU_INIT_POINTER(nat_callforwarding_hook, NULL); |
607 | rcu_assign_pointer(nat_q931_hook, NULL); | 607 | RCU_INIT_POINTER(nat_q931_hook, NULL); |
608 | synchronize_rcu(); | 608 | synchronize_rcu(); |
609 | } | 609 | } |
610 | 610 | ||
diff --git a/net/ipv4/netfilter/nf_nat_irc.c b/net/ipv4/netfilter/nf_nat_irc.c index 535e1a802356..979ae165f4ef 100644 --- a/net/ipv4/netfilter/nf_nat_irc.c +++ b/net/ipv4/netfilter/nf_nat_irc.c | |||
@@ -75,14 +75,14 @@ static unsigned int help(struct sk_buff *skb, | |||
75 | 75 | ||
76 | static void __exit nf_nat_irc_fini(void) | 76 | static void __exit nf_nat_irc_fini(void) |
77 | { | 77 | { |
78 | rcu_assign_pointer(nf_nat_irc_hook, NULL); | 78 | RCU_INIT_POINTER(nf_nat_irc_hook, NULL); |
79 | synchronize_rcu(); | 79 | synchronize_rcu(); |
80 | } | 80 | } |
81 | 81 | ||
82 | static int __init nf_nat_irc_init(void) | 82 | static int __init nf_nat_irc_init(void) |
83 | { | 83 | { |
84 | BUG_ON(nf_nat_irc_hook != NULL); | 84 | BUG_ON(nf_nat_irc_hook != NULL); |
85 | rcu_assign_pointer(nf_nat_irc_hook, help); | 85 | RCU_INIT_POINTER(nf_nat_irc_hook, help); |
86 | return 0; | 86 | return 0; |
87 | } | 87 | } |
88 | 88 | ||
diff --git a/net/ipv4/netfilter/nf_nat_pptp.c b/net/ipv4/netfilter/nf_nat_pptp.c index 4c060038d29f..3e8284ba46b8 100644 --- a/net/ipv4/netfilter/nf_nat_pptp.c +++ b/net/ipv4/netfilter/nf_nat_pptp.c | |||
@@ -282,25 +282,25 @@ static int __init nf_nat_helper_pptp_init(void) | |||
282 | nf_nat_need_gre(); | 282 | nf_nat_need_gre(); |
283 | 283 | ||
284 | BUG_ON(nf_nat_pptp_hook_outbound != NULL); | 284 | BUG_ON(nf_nat_pptp_hook_outbound != NULL); |
285 | rcu_assign_pointer(nf_nat_pptp_hook_outbound, pptp_outbound_pkt); | 285 | RCU_INIT_POINTER(nf_nat_pptp_hook_outbound, pptp_outbound_pkt); |
286 | 286 | ||
287 | BUG_ON(nf_nat_pptp_hook_inbound != NULL); | 287 | BUG_ON(nf_nat_pptp_hook_inbound != NULL); |
288 | rcu_assign_pointer(nf_nat_pptp_hook_inbound, pptp_inbound_pkt); | 288 | RCU_INIT_POINTER(nf_nat_pptp_hook_inbound, pptp_inbound_pkt); |
289 | 289 | ||
290 | BUG_ON(nf_nat_pptp_hook_exp_gre != NULL); | 290 | BUG_ON(nf_nat_pptp_hook_exp_gre != NULL); |
291 | rcu_assign_pointer(nf_nat_pptp_hook_exp_gre, pptp_exp_gre); | 291 | RCU_INIT_POINTER(nf_nat_pptp_hook_exp_gre, pptp_exp_gre); |
292 | 292 | ||
293 | BUG_ON(nf_nat_pptp_hook_expectfn != NULL); | 293 | BUG_ON(nf_nat_pptp_hook_expectfn != NULL); |
294 | rcu_assign_pointer(nf_nat_pptp_hook_expectfn, pptp_nat_expected); | 294 | RCU_INIT_POINTER(nf_nat_pptp_hook_expectfn, pptp_nat_expected); |
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
297 | 297 | ||
298 | static void __exit nf_nat_helper_pptp_fini(void) | 298 | static void __exit nf_nat_helper_pptp_fini(void) |
299 | { | 299 | { |
300 | rcu_assign_pointer(nf_nat_pptp_hook_expectfn, NULL); | 300 | RCU_INIT_POINTER(nf_nat_pptp_hook_expectfn, NULL); |
301 | rcu_assign_pointer(nf_nat_pptp_hook_exp_gre, NULL); | 301 | RCU_INIT_POINTER(nf_nat_pptp_hook_exp_gre, NULL); |
302 | rcu_assign_pointer(nf_nat_pptp_hook_inbound, NULL); | 302 | RCU_INIT_POINTER(nf_nat_pptp_hook_inbound, NULL); |
303 | rcu_assign_pointer(nf_nat_pptp_hook_outbound, NULL); | 303 | RCU_INIT_POINTER(nf_nat_pptp_hook_outbound, NULL); |
304 | synchronize_rcu(); | 304 | synchronize_rcu(); |
305 | } | 305 | } |
306 | 306 | ||
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c index e40cf7816fdb..78844d9208f1 100644 --- a/net/ipv4/netfilter/nf_nat_sip.c +++ b/net/ipv4/netfilter/nf_nat_sip.c | |||
@@ -528,13 +528,13 @@ err1: | |||
528 | 528 | ||
529 | static void __exit nf_nat_sip_fini(void) | 529 | static void __exit nf_nat_sip_fini(void) |
530 | { | 530 | { |
531 | rcu_assign_pointer(nf_nat_sip_hook, NULL); | 531 | RCU_INIT_POINTER(nf_nat_sip_hook, NULL); |
532 | rcu_assign_pointer(nf_nat_sip_seq_adjust_hook, NULL); | 532 | RCU_INIT_POINTER(nf_nat_sip_seq_adjust_hook, NULL); |
533 | rcu_assign_pointer(nf_nat_sip_expect_hook, NULL); | 533 | RCU_INIT_POINTER(nf_nat_sip_expect_hook, NULL); |
534 | rcu_assign_pointer(nf_nat_sdp_addr_hook, NULL); | 534 | RCU_INIT_POINTER(nf_nat_sdp_addr_hook, NULL); |
535 | rcu_assign_pointer(nf_nat_sdp_port_hook, NULL); | 535 | RCU_INIT_POINTER(nf_nat_sdp_port_hook, NULL); |
536 | rcu_assign_pointer(nf_nat_sdp_session_hook, NULL); | 536 | RCU_INIT_POINTER(nf_nat_sdp_session_hook, NULL); |
537 | rcu_assign_pointer(nf_nat_sdp_media_hook, NULL); | 537 | RCU_INIT_POINTER(nf_nat_sdp_media_hook, NULL); |
538 | synchronize_rcu(); | 538 | synchronize_rcu(); |
539 | } | 539 | } |
540 | 540 | ||
@@ -547,13 +547,13 @@ static int __init nf_nat_sip_init(void) | |||
547 | BUG_ON(nf_nat_sdp_port_hook != NULL); | 547 | BUG_ON(nf_nat_sdp_port_hook != NULL); |
548 | BUG_ON(nf_nat_sdp_session_hook != NULL); | 548 | BUG_ON(nf_nat_sdp_session_hook != NULL); |
549 | BUG_ON(nf_nat_sdp_media_hook != NULL); | 549 | BUG_ON(nf_nat_sdp_media_hook != NULL); |
550 | rcu_assign_pointer(nf_nat_sip_hook, ip_nat_sip); | 550 | RCU_INIT_POINTER(nf_nat_sip_hook, ip_nat_sip); |
551 | rcu_assign_pointer(nf_nat_sip_seq_adjust_hook, ip_nat_sip_seq_adjust); | 551 | RCU_INIT_POINTER(nf_nat_sip_seq_adjust_hook, ip_nat_sip_seq_adjust); |
552 | rcu_assign_pointer(nf_nat_sip_expect_hook, ip_nat_sip_expect); | 552 | RCU_INIT_POINTER(nf_nat_sip_expect_hook, ip_nat_sip_expect); |
553 | rcu_assign_pointer(nf_nat_sdp_addr_hook, ip_nat_sdp_addr); | 553 | RCU_INIT_POINTER(nf_nat_sdp_addr_hook, ip_nat_sdp_addr); |
554 | rcu_assign_pointer(nf_nat_sdp_port_hook, ip_nat_sdp_port); | 554 | RCU_INIT_POINTER(nf_nat_sdp_port_hook, ip_nat_sdp_port); |
555 | rcu_assign_pointer(nf_nat_sdp_session_hook, ip_nat_sdp_session); | 555 | RCU_INIT_POINTER(nf_nat_sdp_session_hook, ip_nat_sdp_session); |
556 | rcu_assign_pointer(nf_nat_sdp_media_hook, ip_nat_sdp_media); | 556 | RCU_INIT_POINTER(nf_nat_sdp_media_hook, ip_nat_sdp_media); |
557 | return 0; | 557 | return 0; |
558 | } | 558 | } |
559 | 559 | ||
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 076b7c8c4aa4..d1cb412c18e0 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -1310,7 +1310,7 @@ static int __init nf_nat_snmp_basic_init(void) | |||
1310 | int ret = 0; | 1310 | int ret = 0; |
1311 | 1311 | ||
1312 | BUG_ON(nf_nat_snmp_hook != NULL); | 1312 | BUG_ON(nf_nat_snmp_hook != NULL); |
1313 | rcu_assign_pointer(nf_nat_snmp_hook, help); | 1313 | RCU_INIT_POINTER(nf_nat_snmp_hook, help); |
1314 | 1314 | ||
1315 | ret = nf_conntrack_helper_register(&snmp_trap_helper); | 1315 | ret = nf_conntrack_helper_register(&snmp_trap_helper); |
1316 | if (ret < 0) { | 1316 | if (ret < 0) { |
@@ -1322,7 +1322,7 @@ static int __init nf_nat_snmp_basic_init(void) | |||
1322 | 1322 | ||
1323 | static void __exit nf_nat_snmp_basic_fini(void) | 1323 | static void __exit nf_nat_snmp_basic_fini(void) |
1324 | { | 1324 | { |
1325 | rcu_assign_pointer(nf_nat_snmp_hook, NULL); | 1325 | RCU_INIT_POINTER(nf_nat_snmp_hook, NULL); |
1326 | nf_conntrack_helper_unregister(&snmp_trap_helper); | 1326 | nf_conntrack_helper_unregister(&snmp_trap_helper); |
1327 | } | 1327 | } |
1328 | 1328 | ||
diff --git a/net/ipv4/netfilter/nf_nat_standalone.c b/net/ipv4/netfilter/nf_nat_standalone.c index a6e606e84820..92900482edea 100644 --- a/net/ipv4/netfilter/nf_nat_standalone.c +++ b/net/ipv4/netfilter/nf_nat_standalone.c | |||
@@ -284,7 +284,7 @@ static int __init nf_nat_standalone_init(void) | |||
284 | 284 | ||
285 | #ifdef CONFIG_XFRM | 285 | #ifdef CONFIG_XFRM |
286 | BUG_ON(ip_nat_decode_session != NULL); | 286 | BUG_ON(ip_nat_decode_session != NULL); |
287 | rcu_assign_pointer(ip_nat_decode_session, nat_decode_session); | 287 | RCU_INIT_POINTER(ip_nat_decode_session, nat_decode_session); |
288 | #endif | 288 | #endif |
289 | ret = nf_nat_rule_init(); | 289 | ret = nf_nat_rule_init(); |
290 | if (ret < 0) { | 290 | if (ret < 0) { |
@@ -302,7 +302,7 @@ static int __init nf_nat_standalone_init(void) | |||
302 | nf_nat_rule_cleanup(); | 302 | nf_nat_rule_cleanup(); |
303 | cleanup_decode_session: | 303 | cleanup_decode_session: |
304 | #ifdef CONFIG_XFRM | 304 | #ifdef CONFIG_XFRM |
305 | rcu_assign_pointer(ip_nat_decode_session, NULL); | 305 | RCU_INIT_POINTER(ip_nat_decode_session, NULL); |
306 | synchronize_net(); | 306 | synchronize_net(); |
307 | #endif | 307 | #endif |
308 | return ret; | 308 | return ret; |
@@ -313,7 +313,7 @@ static void __exit nf_nat_standalone_fini(void) | |||
313 | nf_unregister_hooks(nf_nat_ops, ARRAY_SIZE(nf_nat_ops)); | 313 | nf_unregister_hooks(nf_nat_ops, ARRAY_SIZE(nf_nat_ops)); |
314 | nf_nat_rule_cleanup(); | 314 | nf_nat_rule_cleanup(); |
315 | #ifdef CONFIG_XFRM | 315 | #ifdef CONFIG_XFRM |
316 | rcu_assign_pointer(ip_nat_decode_session, NULL); | 316 | RCU_INIT_POINTER(ip_nat_decode_session, NULL); |
317 | synchronize_net(); | 317 | synchronize_net(); |
318 | #endif | 318 | #endif |
319 | /* Conntrack caches are unregistered in nf_conntrack_cleanup */ | 319 | /* Conntrack caches are unregistered in nf_conntrack_cleanup */ |
diff --git a/net/ipv4/netfilter/nf_nat_tftp.c b/net/ipv4/netfilter/nf_nat_tftp.c index 7274a43c7a12..a2901bf829c0 100644 --- a/net/ipv4/netfilter/nf_nat_tftp.c +++ b/net/ipv4/netfilter/nf_nat_tftp.c | |||
@@ -36,14 +36,14 @@ static unsigned int help(struct sk_buff *skb, | |||
36 | 36 | ||
37 | static void __exit nf_nat_tftp_fini(void) | 37 | static void __exit nf_nat_tftp_fini(void) |
38 | { | 38 | { |
39 | rcu_assign_pointer(nf_nat_tftp_hook, NULL); | 39 | RCU_INIT_POINTER(nf_nat_tftp_hook, NULL); |
40 | synchronize_rcu(); | 40 | synchronize_rcu(); |
41 | } | 41 | } |
42 | 42 | ||
43 | static int __init nf_nat_tftp_init(void) | 43 | static int __init nf_nat_tftp_init(void) |
44 | { | 44 | { |
45 | BUG_ON(nf_nat_tftp_hook != NULL); | 45 | BUG_ON(nf_nat_tftp_hook != NULL); |
46 | rcu_assign_pointer(nf_nat_tftp_hook, help); | 46 | RCU_INIT_POINTER(nf_nat_tftp_hook, help); |
47 | return 0; | 47 | return 0; |
48 | } | 48 | } |
49 | 49 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 9a852156a8f3..7d82123b1d26 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -428,7 +428,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) | |||
428 | ndev->tstamp = jiffies; | 428 | ndev->tstamp = jiffies; |
429 | addrconf_sysctl_register(ndev); | 429 | addrconf_sysctl_register(ndev); |
430 | /* protected by rtnl_lock */ | 430 | /* protected by rtnl_lock */ |
431 | rcu_assign_pointer(dev->ip6_ptr, ndev); | 431 | RCU_INIT_POINTER(dev->ip6_ptr, ndev); |
432 | 432 | ||
433 | /* Join all-node multicast group */ | 433 | /* Join all-node multicast group */ |
434 | ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes); | 434 | ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes); |
@@ -2733,7 +2733,7 @@ static int addrconf_ifdown(struct net_device *dev, int how) | |||
2733 | idev->dead = 1; | 2733 | idev->dead = 1; |
2734 | 2734 | ||
2735 | /* protected by rtnl_lock */ | 2735 | /* protected by rtnl_lock */ |
2736 | rcu_assign_pointer(dev->ip6_ptr, NULL); | 2736 | RCU_INIT_POINTER(dev->ip6_ptr, NULL); |
2737 | 2737 | ||
2738 | /* Step 1.5: remove snmp6 entry */ | 2738 | /* Step 1.5: remove snmp6 entry */ |
2739 | snmp6_unregister_dev(idev); | 2739 | snmp6_unregister_dev(idev); |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 6fb1fb3624bf..694d70a8a0ee 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -218,8 +218,8 @@ ip6_tnl_link(struct ip6_tnl_net *ip6n, struct ip6_tnl *t) | |||
218 | { | 218 | { |
219 | struct ip6_tnl __rcu **tp = ip6_tnl_bucket(ip6n, &t->parms); | 219 | struct ip6_tnl __rcu **tp = ip6_tnl_bucket(ip6n, &t->parms); |
220 | 220 | ||
221 | rcu_assign_pointer(t->next , rtnl_dereference(*tp)); | 221 | RCU_INIT_POINTER(t->next , rtnl_dereference(*tp)); |
222 | rcu_assign_pointer(*tp, t); | 222 | RCU_INIT_POINTER(*tp, t); |
223 | } | 223 | } |
224 | 224 | ||
225 | /** | 225 | /** |
@@ -237,7 +237,7 @@ ip6_tnl_unlink(struct ip6_tnl_net *ip6n, struct ip6_tnl *t) | |||
237 | (iter = rtnl_dereference(*tp)) != NULL; | 237 | (iter = rtnl_dereference(*tp)) != NULL; |
238 | tp = &iter->next) { | 238 | tp = &iter->next) { |
239 | if (t == iter) { | 239 | if (t == iter) { |
240 | rcu_assign_pointer(*tp, t->next); | 240 | RCU_INIT_POINTER(*tp, t->next); |
241 | break; | 241 | break; |
242 | } | 242 | } |
243 | } | 243 | } |
@@ -350,7 +350,7 @@ ip6_tnl_dev_uninit(struct net_device *dev) | |||
350 | struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); | 350 | struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); |
351 | 351 | ||
352 | if (dev == ip6n->fb_tnl_dev) | 352 | if (dev == ip6n->fb_tnl_dev) |
353 | rcu_assign_pointer(ip6n->tnls_wc[0], NULL); | 353 | RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); |
354 | else | 354 | else |
355 | ip6_tnl_unlink(ip6n, t); | 355 | ip6_tnl_unlink(ip6n, t); |
356 | ip6_tnl_dst_reset(t); | 356 | ip6_tnl_dst_reset(t); |
@@ -1440,7 +1440,7 @@ static int __net_init ip6_fb_tnl_dev_init(struct net_device *dev) | |||
1440 | 1440 | ||
1441 | t->parms.proto = IPPROTO_IPV6; | 1441 | t->parms.proto = IPPROTO_IPV6; |
1442 | dev_hold(dev); | 1442 | dev_hold(dev); |
1443 | rcu_assign_pointer(ip6n->tnls_wc[0], t); | 1443 | RCU_INIT_POINTER(ip6n->tnls_wc[0], t); |
1444 | return 0; | 1444 | return 0; |
1445 | } | 1445 | } |
1446 | 1446 | ||
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 6a79f3081bdb..4f45dc9e4f5e 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -130,14 +130,14 @@ static mh_filter_t __rcu *mh_filter __read_mostly; | |||
130 | 130 | ||
131 | int rawv6_mh_filter_register(mh_filter_t filter) | 131 | int rawv6_mh_filter_register(mh_filter_t filter) |
132 | { | 132 | { |
133 | rcu_assign_pointer(mh_filter, filter); | 133 | RCU_INIT_POINTER(mh_filter, filter); |
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | EXPORT_SYMBOL(rawv6_mh_filter_register); | 136 | EXPORT_SYMBOL(rawv6_mh_filter_register); |
137 | 137 | ||
138 | int rawv6_mh_filter_unregister(mh_filter_t filter) | 138 | int rawv6_mh_filter_unregister(mh_filter_t filter) |
139 | { | 139 | { |
140 | rcu_assign_pointer(mh_filter, NULL); | 140 | RCU_INIT_POINTER(mh_filter, NULL); |
141 | synchronize_rcu(); | 141 | synchronize_rcu(); |
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 07bf1085458f..e48a41c133f1 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -182,7 +182,7 @@ static void ipip6_tunnel_unlink(struct sit_net *sitn, struct ip_tunnel *t) | |||
182 | (iter = rtnl_dereference(*tp)) != NULL; | 182 | (iter = rtnl_dereference(*tp)) != NULL; |
183 | tp = &iter->next) { | 183 | tp = &iter->next) { |
184 | if (t == iter) { | 184 | if (t == iter) { |
185 | rcu_assign_pointer(*tp, t->next); | 185 | RCU_INIT_POINTER(*tp, t->next); |
186 | break; | 186 | break; |
187 | } | 187 | } |
188 | } | 188 | } |
@@ -192,8 +192,8 @@ static void ipip6_tunnel_link(struct sit_net *sitn, struct ip_tunnel *t) | |||
192 | { | 192 | { |
193 | struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t); | 193 | struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t); |
194 | 194 | ||
195 | rcu_assign_pointer(t->next, rtnl_dereference(*tp)); | 195 | RCU_INIT_POINTER(t->next, rtnl_dereference(*tp)); |
196 | rcu_assign_pointer(*tp, t); | 196 | RCU_INIT_POINTER(*tp, t); |
197 | } | 197 | } |
198 | 198 | ||
199 | static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn) | 199 | static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn) |
@@ -391,7 +391,7 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) | |||
391 | p->addr = a->addr; | 391 | p->addr = a->addr; |
392 | p->flags = a->flags; | 392 | p->flags = a->flags; |
393 | t->prl_count++; | 393 | t->prl_count++; |
394 | rcu_assign_pointer(t->prl, p); | 394 | RCU_INIT_POINTER(t->prl, p); |
395 | out: | 395 | out: |
396 | return err; | 396 | return err; |
397 | } | 397 | } |
@@ -474,7 +474,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev) | |||
474 | struct sit_net *sitn = net_generic(net, sit_net_id); | 474 | struct sit_net *sitn = net_generic(net, sit_net_id); |
475 | 475 | ||
476 | if (dev == sitn->fb_tunnel_dev) { | 476 | if (dev == sitn->fb_tunnel_dev) { |
477 | rcu_assign_pointer(sitn->tunnels_wc[0], NULL); | 477 | RCU_INIT_POINTER(sitn->tunnels_wc[0], NULL); |
478 | } else { | 478 | } else { |
479 | ipip6_tunnel_unlink(sitn, netdev_priv(dev)); | 479 | ipip6_tunnel_unlink(sitn, netdev_priv(dev)); |
480 | ipip6_tunnel_del_prl(netdev_priv(dev), NULL); | 480 | ipip6_tunnel_del_prl(netdev_priv(dev), NULL); |
@@ -1173,7 +1173,7 @@ static int __net_init ipip6_fb_tunnel_init(struct net_device *dev) | |||
1173 | if (!dev->tstats) | 1173 | if (!dev->tstats) |
1174 | return -ENOMEM; | 1174 | return -ENOMEM; |
1175 | dev_hold(dev); | 1175 | dev_hold(dev); |
1176 | rcu_assign_pointer(sitn->tunnels_wc[0], tunnel); | 1176 | RCU_INIT_POINTER(sitn->tunnels_wc[0], tunnel); |
1177 | return 0; | 1177 | return 0; |
1178 | } | 1178 | } |
1179 | 1179 | ||
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index fd1aaf2a4a6c..9b5bd8cafc20 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -69,7 +69,7 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
69 | if (!tid_rx) | 69 | if (!tid_rx) |
70 | return; | 70 | return; |
71 | 71 | ||
72 | rcu_assign_pointer(sta->ampdu_mlme.tid_rx[tid], NULL); | 72 | RCU_INIT_POINTER(sta->ampdu_mlme.tid_rx[tid], NULL); |
73 | 73 | ||
74 | #ifdef CONFIG_MAC80211_HT_DEBUG | 74 | #ifdef CONFIG_MAC80211_HT_DEBUG |
75 | printk(KERN_DEBUG "Rx BA session stop requested for %pM tid %u\n", | 75 | printk(KERN_DEBUG "Rx BA session stop requested for %pM tid %u\n", |
@@ -340,7 +340,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
340 | status = WLAN_STATUS_SUCCESS; | 340 | status = WLAN_STATUS_SUCCESS; |
341 | 341 | ||
342 | /* activate it for RX */ | 342 | /* activate it for RX */ |
343 | rcu_assign_pointer(sta->ampdu_mlme.tid_rx[tid], tid_agg_rx); | 343 | RCU_INIT_POINTER(sta->ampdu_mlme.tid_rx[tid], tid_agg_rx); |
344 | 344 | ||
345 | if (timeout) | 345 | if (timeout) |
346 | mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); | 346 | mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 3d1b091d9b2e..86f8f49dae2f 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -62,7 +62,7 @@ static int ieee80211_change_iface(struct wiphy *wiphy, | |||
62 | 62 | ||
63 | if (type == NL80211_IFTYPE_AP_VLAN && | 63 | if (type == NL80211_IFTYPE_AP_VLAN && |
64 | params && params->use_4addr == 0) | 64 | params && params->use_4addr == 0) |
65 | rcu_assign_pointer(sdata->u.vlan.sta, NULL); | 65 | RCU_INIT_POINTER(sdata->u.vlan.sta, NULL); |
66 | else if (type == NL80211_IFTYPE_STATION && | 66 | else if (type == NL80211_IFTYPE_STATION && |
67 | params && params->use_4addr >= 0) | 67 | params && params->use_4addr >= 0) |
68 | sdata->u.mgd.use_4addr = params->use_4addr; | 68 | sdata->u.mgd.use_4addr = params->use_4addr; |
@@ -542,7 +542,7 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata, | |||
542 | 542 | ||
543 | sdata->vif.bss_conf.dtim_period = new->dtim_period; | 543 | sdata->vif.bss_conf.dtim_period = new->dtim_period; |
544 | 544 | ||
545 | rcu_assign_pointer(sdata->u.ap.beacon, new); | 545 | RCU_INIT_POINTER(sdata->u.ap.beacon, new); |
546 | 546 | ||
547 | synchronize_rcu(); | 547 | synchronize_rcu(); |
548 | 548 | ||
@@ -594,7 +594,7 @@ static int ieee80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) | |||
594 | if (!old) | 594 | if (!old) |
595 | return -ENOENT; | 595 | return -ENOENT; |
596 | 596 | ||
597 | rcu_assign_pointer(sdata->u.ap.beacon, NULL); | 597 | RCU_INIT_POINTER(sdata->u.ap.beacon, NULL); |
598 | synchronize_rcu(); | 598 | synchronize_rcu(); |
599 | kfree(old); | 599 | kfree(old); |
600 | 600 | ||
@@ -857,7 +857,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
857 | return -EBUSY; | 857 | return -EBUSY; |
858 | } | 858 | } |
859 | 859 | ||
860 | rcu_assign_pointer(vlansdata->u.vlan.sta, sta); | 860 | RCU_INIT_POINTER(vlansdata->u.vlan.sta, sta); |
861 | } | 861 | } |
862 | 862 | ||
863 | sta->sdata = vlansdata; | 863 | sta->sdata = vlansdata; |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 56c24cabf26d..4f9235b18a03 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -84,7 +84,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
84 | drv_reset_tsf(local); | 84 | drv_reset_tsf(local); |
85 | 85 | ||
86 | skb = ifibss->skb; | 86 | skb = ifibss->skb; |
87 | rcu_assign_pointer(ifibss->presp, NULL); | 87 | RCU_INIT_POINTER(ifibss->presp, NULL); |
88 | synchronize_rcu(); | 88 | synchronize_rcu(); |
89 | skb->data = skb->head; | 89 | skb->data = skb->head; |
90 | skb->len = 0; | 90 | skb->len = 0; |
@@ -184,7 +184,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
184 | *pos++ = 0; /* U-APSD no in use */ | 184 | *pos++ = 0; /* U-APSD no in use */ |
185 | } | 185 | } |
186 | 186 | ||
187 | rcu_assign_pointer(ifibss->presp, skb); | 187 | RCU_INIT_POINTER(ifibss->presp, skb); |
188 | 188 | ||
189 | sdata->vif.bss_conf.beacon_int = beacon_int; | 189 | sdata->vif.bss_conf.beacon_int = beacon_int; |
190 | sdata->vif.bss_conf.basic_rates = basic_rates; | 190 | sdata->vif.bss_conf.basic_rates = basic_rates; |
@@ -995,7 +995,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
995 | kfree(sdata->u.ibss.ie); | 995 | kfree(sdata->u.ibss.ie); |
996 | skb = rcu_dereference_protected(sdata->u.ibss.presp, | 996 | skb = rcu_dereference_protected(sdata->u.ibss.presp, |
997 | lockdep_is_held(&sdata->u.ibss.mtx)); | 997 | lockdep_is_held(&sdata->u.ibss.mtx)); |
998 | rcu_assign_pointer(sdata->u.ibss.presp, NULL); | 998 | RCU_INIT_POINTER(sdata->u.ibss.presp, NULL); |
999 | sdata->vif.bss_conf.ibss_joined = false; | 999 | sdata->vif.bss_conf.ibss_joined = false; |
1000 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED | | 1000 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED | |
1001 | BSS_CHANGED_IBSS); | 1001 | BSS_CHANGED_IBSS); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 556e7e6ddf0a..c798b434eb64 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -456,7 +456,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
456 | BSS_CHANGED_BEACON_ENABLED); | 456 | BSS_CHANGED_BEACON_ENABLED); |
457 | 457 | ||
458 | /* remove beacon */ | 458 | /* remove beacon */ |
459 | rcu_assign_pointer(sdata->u.ap.beacon, NULL); | 459 | RCU_INIT_POINTER(sdata->u.ap.beacon, NULL); |
460 | synchronize_rcu(); | 460 | synchronize_rcu(); |
461 | kfree(old_beacon); | 461 | kfree(old_beacon); |
462 | 462 | ||
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 3db78b696c5c..8b6ebee073e2 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -72,7 +72,7 @@ static int sta_info_hash_del(struct ieee80211_local *local, | |||
72 | if (!s) | 72 | if (!s) |
73 | return -ENOENT; | 73 | return -ENOENT; |
74 | if (s == sta) { | 74 | if (s == sta) { |
75 | rcu_assign_pointer(local->sta_hash[STA_HASH(sta->sta.addr)], | 75 | RCU_INIT_POINTER(local->sta_hash[STA_HASH(sta->sta.addr)], |
76 | s->hnext); | 76 | s->hnext); |
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
@@ -82,7 +82,7 @@ static int sta_info_hash_del(struct ieee80211_local *local, | |||
82 | s = rcu_dereference_protected(s->hnext, | 82 | s = rcu_dereference_protected(s->hnext, |
83 | lockdep_is_held(&local->sta_lock)); | 83 | lockdep_is_held(&local->sta_lock)); |
84 | if (rcu_access_pointer(s->hnext)) { | 84 | if (rcu_access_pointer(s->hnext)) { |
85 | rcu_assign_pointer(s->hnext, sta->hnext); | 85 | RCU_INIT_POINTER(s->hnext, sta->hnext); |
86 | return 0; | 86 | return 0; |
87 | } | 87 | } |
88 | 88 | ||
@@ -184,7 +184,7 @@ static void sta_info_hash_add(struct ieee80211_local *local, | |||
184 | struct sta_info *sta) | 184 | struct sta_info *sta) |
185 | { | 185 | { |
186 | sta->hnext = local->sta_hash[STA_HASH(sta->sta.addr)]; | 186 | sta->hnext = local->sta_hash[STA_HASH(sta->sta.addr)]; |
187 | rcu_assign_pointer(local->sta_hash[STA_HASH(sta->sta.addr)], sta); | 187 | RCU_INIT_POINTER(local->sta_hash[STA_HASH(sta->sta.addr)], sta); |
188 | } | 188 | } |
189 | 189 | ||
190 | static void sta_unblock(struct work_struct *wk) | 190 | static void sta_unblock(struct work_struct *wk) |
@@ -672,7 +672,7 @@ static int __must_check __sta_info_destroy(struct sta_info *sta) | |||
672 | local->sta_generation++; | 672 | local->sta_generation++; |
673 | 673 | ||
674 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 674 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
675 | rcu_assign_pointer(sdata->u.vlan.sta, NULL); | 675 | RCU_INIT_POINTER(sdata->u.vlan.sta, NULL); |
676 | 676 | ||
677 | if (sta->uploaded) { | 677 | if (sta->uploaded) { |
678 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 678 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
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); |
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index 2aa975e5452d..c0594cdfe617 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c | |||
@@ -282,7 +282,7 @@ int __init netlbl_domhsh_init(u32 size) | |||
282 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); | 282 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); |
283 | 283 | ||
284 | spin_lock(&netlbl_domhsh_lock); | 284 | spin_lock(&netlbl_domhsh_lock); |
285 | rcu_assign_pointer(netlbl_domhsh, hsh_tbl); | 285 | RCU_INIT_POINTER(netlbl_domhsh, hsh_tbl); |
286 | spin_unlock(&netlbl_domhsh_lock); | 286 | spin_unlock(&netlbl_domhsh_lock); |
287 | 287 | ||
288 | return 0; | 288 | return 0; |
@@ -330,7 +330,7 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, | |||
330 | &rcu_dereference(netlbl_domhsh)->tbl[bkt]); | 330 | &rcu_dereference(netlbl_domhsh)->tbl[bkt]); |
331 | } else { | 331 | } else { |
332 | INIT_LIST_HEAD(&entry->list); | 332 | INIT_LIST_HEAD(&entry->list); |
333 | rcu_assign_pointer(netlbl_domhsh_def, entry); | 333 | RCU_INIT_POINTER(netlbl_domhsh_def, entry); |
334 | } | 334 | } |
335 | 335 | ||
336 | if (entry->type == NETLBL_NLTYPE_ADDRSELECT) { | 336 | if (entry->type == NETLBL_NLTYPE_ADDRSELECT) { |
@@ -451,7 +451,7 @@ int netlbl_domhsh_remove_entry(struct netlbl_dom_map *entry, | |||
451 | if (entry != rcu_dereference(netlbl_domhsh_def)) | 451 | if (entry != rcu_dereference(netlbl_domhsh_def)) |
452 | list_del_rcu(&entry->list); | 452 | list_del_rcu(&entry->list); |
453 | else | 453 | else |
454 | rcu_assign_pointer(netlbl_domhsh_def, NULL); | 454 | RCU_INIT_POINTER(netlbl_domhsh_def, NULL); |
455 | } else | 455 | } else |
456 | ret_val = -ENOENT; | 456 | ret_val = -ENOENT; |
457 | spin_unlock(&netlbl_domhsh_lock); | 457 | spin_unlock(&netlbl_domhsh_lock); |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index f1ecf848e3ac..5a587cf6c86f 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -354,7 +354,7 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_add_iface(int ifindex) | |||
354 | INIT_LIST_HEAD(&iface->list); | 354 | INIT_LIST_HEAD(&iface->list); |
355 | if (netlbl_unlhsh_rcu_deref(netlbl_unlhsh_def) != NULL) | 355 | if (netlbl_unlhsh_rcu_deref(netlbl_unlhsh_def) != NULL) |
356 | goto add_iface_failure; | 356 | goto add_iface_failure; |
357 | rcu_assign_pointer(netlbl_unlhsh_def, iface); | 357 | RCU_INIT_POINTER(netlbl_unlhsh_def, iface); |
358 | } | 358 | } |
359 | spin_unlock(&netlbl_unlhsh_lock); | 359 | spin_unlock(&netlbl_unlhsh_lock); |
360 | 360 | ||
@@ -621,7 +621,7 @@ static void netlbl_unlhsh_condremove_iface(struct netlbl_unlhsh_iface *iface) | |||
621 | if (iface->ifindex > 0) | 621 | if (iface->ifindex > 0) |
622 | list_del_rcu(&iface->list); | 622 | list_del_rcu(&iface->list); |
623 | else | 623 | else |
624 | rcu_assign_pointer(netlbl_unlhsh_def, NULL); | 624 | RCU_INIT_POINTER(netlbl_unlhsh_def, NULL); |
625 | spin_unlock(&netlbl_unlhsh_lock); | 625 | spin_unlock(&netlbl_unlhsh_lock); |
626 | 626 | ||
627 | call_rcu(&iface->rcu, netlbl_unlhsh_free_iface); | 627 | call_rcu(&iface->rcu, netlbl_unlhsh_free_iface); |
@@ -1449,7 +1449,7 @@ int __init netlbl_unlabel_init(u32 size) | |||
1449 | 1449 | ||
1450 | rcu_read_lock(); | 1450 | rcu_read_lock(); |
1451 | spin_lock(&netlbl_unlhsh_lock); | 1451 | spin_lock(&netlbl_unlhsh_lock); |
1452 | rcu_assign_pointer(netlbl_unlhsh, hsh_tbl); | 1452 | RCU_INIT_POINTER(netlbl_unlhsh, hsh_tbl); |
1453 | spin_unlock(&netlbl_unlhsh_lock); | 1453 | spin_unlock(&netlbl_unlhsh_lock); |
1454 | rcu_read_unlock(); | 1454 | rcu_read_unlock(); |
1455 | 1455 | ||
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index c6fffd946d42..bf10ea8fbbf9 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -480,7 +480,7 @@ int __init_or_module phonet_proto_register(unsigned int protocol, | |||
480 | if (proto_tab[protocol]) | 480 | if (proto_tab[protocol]) |
481 | err = -EBUSY; | 481 | err = -EBUSY; |
482 | else | 482 | else |
483 | rcu_assign_pointer(proto_tab[protocol], pp); | 483 | RCU_INIT_POINTER(proto_tab[protocol], pp); |
484 | mutex_unlock(&proto_tab_lock); | 484 | mutex_unlock(&proto_tab_lock); |
485 | 485 | ||
486 | return err; | 486 | return err; |
@@ -491,7 +491,7 @@ void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp) | |||
491 | { | 491 | { |
492 | mutex_lock(&proto_tab_lock); | 492 | mutex_lock(&proto_tab_lock); |
493 | BUG_ON(proto_tab[protocol] != pp); | 493 | BUG_ON(proto_tab[protocol] != pp); |
494 | rcu_assign_pointer(proto_tab[protocol], NULL); | 494 | RCU_INIT_POINTER(proto_tab[protocol], NULL); |
495 | mutex_unlock(&proto_tab_lock); | 495 | mutex_unlock(&proto_tab_lock); |
496 | synchronize_rcu(); | 496 | synchronize_rcu(); |
497 | proto_unregister(pp->prot); | 497 | proto_unregister(pp->prot); |
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index d2df8f33160b..c5827614376b 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c | |||
@@ -276,7 +276,7 @@ static void phonet_route_autodel(struct net_device *dev) | |||
276 | mutex_lock(&pnn->routes.lock); | 276 | mutex_lock(&pnn->routes.lock); |
277 | for (i = 0; i < 64; i++) | 277 | for (i = 0; i < 64; i++) |
278 | if (dev == pnn->routes.table[i]) { | 278 | if (dev == pnn->routes.table[i]) { |
279 | rcu_assign_pointer(pnn->routes.table[i], NULL); | 279 | RCU_INIT_POINTER(pnn->routes.table[i], NULL); |
280 | set_bit(i, deleted); | 280 | set_bit(i, deleted); |
281 | } | 281 | } |
282 | mutex_unlock(&pnn->routes.lock); | 282 | mutex_unlock(&pnn->routes.lock); |
@@ -390,7 +390,7 @@ int phonet_route_add(struct net_device *dev, u8 daddr) | |||
390 | daddr = daddr >> 2; | 390 | daddr = daddr >> 2; |
391 | mutex_lock(&routes->lock); | 391 | mutex_lock(&routes->lock); |
392 | if (routes->table[daddr] == NULL) { | 392 | if (routes->table[daddr] == NULL) { |
393 | rcu_assign_pointer(routes->table[daddr], dev); | 393 | RCU_INIT_POINTER(routes->table[daddr], dev); |
394 | dev_hold(dev); | 394 | dev_hold(dev); |
395 | err = 0; | 395 | err = 0; |
396 | } | 396 | } |
@@ -406,7 +406,7 @@ int phonet_route_del(struct net_device *dev, u8 daddr) | |||
406 | daddr = daddr >> 2; | 406 | daddr = daddr >> 2; |
407 | mutex_lock(&routes->lock); | 407 | mutex_lock(&routes->lock); |
408 | if (dev == routes->table[daddr]) | 408 | if (dev == routes->table[daddr]) |
409 | rcu_assign_pointer(routes->table[daddr], NULL); | 409 | RCU_INIT_POINTER(routes->table[daddr], NULL); |
410 | else | 410 | else |
411 | dev = NULL; | 411 | dev = NULL; |
412 | mutex_unlock(&routes->lock); | 412 | mutex_unlock(&routes->lock); |
diff --git a/net/phonet/socket.c b/net/phonet/socket.c index ab07711cf2f4..676d18dc75b7 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c | |||
@@ -679,7 +679,7 @@ int pn_sock_bind_res(struct sock *sk, u8 res) | |||
679 | mutex_lock(&resource_mutex); | 679 | mutex_lock(&resource_mutex); |
680 | if (pnres.sk[res] == NULL) { | 680 | if (pnres.sk[res] == NULL) { |
681 | sock_hold(sk); | 681 | sock_hold(sk); |
682 | rcu_assign_pointer(pnres.sk[res], sk); | 682 | RCU_INIT_POINTER(pnres.sk[res], sk); |
683 | ret = 0; | 683 | ret = 0; |
684 | } | 684 | } |
685 | mutex_unlock(&resource_mutex); | 685 | mutex_unlock(&resource_mutex); |
@@ -695,7 +695,7 @@ int pn_sock_unbind_res(struct sock *sk, u8 res) | |||
695 | 695 | ||
696 | mutex_lock(&resource_mutex); | 696 | mutex_lock(&resource_mutex); |
697 | if (pnres.sk[res] == sk) { | 697 | if (pnres.sk[res] == sk) { |
698 | rcu_assign_pointer(pnres.sk[res], NULL); | 698 | RCU_INIT_POINTER(pnres.sk[res], NULL); |
699 | ret = 0; | 699 | ret = 0; |
700 | } | 700 | } |
701 | mutex_unlock(&resource_mutex); | 701 | mutex_unlock(&resource_mutex); |
@@ -714,7 +714,7 @@ void pn_sock_unbind_all_res(struct sock *sk) | |||
714 | mutex_lock(&resource_mutex); | 714 | mutex_lock(&resource_mutex); |
715 | for (res = 0; res < 256; res++) { | 715 | for (res = 0; res < 256; res++) { |
716 | if (pnres.sk[res] == sk) { | 716 | if (pnres.sk[res] == sk) { |
717 | rcu_assign_pointer(pnres.sk[res], NULL); | 717 | RCU_INIT_POINTER(pnres.sk[res], NULL); |
718 | match++; | 718 | match++; |
719 | } | 719 | } |
720 | } | 720 | } |
diff --git a/net/socket.c b/net/socket.c index b1cbbcd92558..7ec8f9b669b3 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -2463,7 +2463,7 @@ int sock_register(const struct net_proto_family *ops) | |||
2463 | lockdep_is_held(&net_family_lock))) | 2463 | lockdep_is_held(&net_family_lock))) |
2464 | err = -EEXIST; | 2464 | err = -EEXIST; |
2465 | else { | 2465 | else { |
2466 | rcu_assign_pointer(net_families[ops->family], ops); | 2466 | RCU_INIT_POINTER(net_families[ops->family], ops); |
2467 | err = 0; | 2467 | err = 0; |
2468 | } | 2468 | } |
2469 | spin_unlock(&net_family_lock); | 2469 | spin_unlock(&net_family_lock); |
@@ -2491,7 +2491,7 @@ void sock_unregister(int family) | |||
2491 | BUG_ON(family < 0 || family >= NPROTO); | 2491 | BUG_ON(family < 0 || family >= NPROTO); |
2492 | 2492 | ||
2493 | spin_lock(&net_family_lock); | 2493 | spin_lock(&net_family_lock); |
2494 | rcu_assign_pointer(net_families[family], NULL); | 2494 | RCU_INIT_POINTER(net_families[family], NULL); |
2495 | spin_unlock(&net_family_lock); | 2495 | spin_unlock(&net_family_lock); |
2496 | 2496 | ||
2497 | synchronize_rcu(); | 2497 | synchronize_rcu(); |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 364eb45e989d..d4132754cbe1 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -122,7 +122,7 @@ gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx) | |||
122 | if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) | 122 | if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) |
123 | return; | 123 | return; |
124 | gss_get_ctx(ctx); | 124 | gss_get_ctx(ctx); |
125 | rcu_assign_pointer(gss_cred->gc_ctx, ctx); | 125 | RCU_INIT_POINTER(gss_cred->gc_ctx, ctx); |
126 | set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); | 126 | set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); |
127 | smp_mb__before_clear_bit(); | 127 | smp_mb__before_clear_bit(); |
128 | clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); | 128 | clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); |
@@ -970,7 +970,7 @@ gss_destroy_nullcred(struct rpc_cred *cred) | |||
970 | struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth); | 970 | struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth); |
971 | struct gss_cl_ctx *ctx = gss_cred->gc_ctx; | 971 | struct gss_cl_ctx *ctx = gss_cred->gc_ctx; |
972 | 972 | ||
973 | rcu_assign_pointer(gss_cred->gc_ctx, NULL); | 973 | RCU_INIT_POINTER(gss_cred->gc_ctx, NULL); |
974 | call_rcu(&cred->cr_rcu, gss_free_cred_callback); | 974 | call_rcu(&cred->cr_rcu, gss_free_cred_callback); |
975 | if (ctx) | 975 | if (ctx) |
976 | gss_put_ctx(ctx); | 976 | gss_put_ctx(ctx); |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 0256b8a0a7cf..d0a42df5160e 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -2927,7 +2927,7 @@ static int __net_init xfrm_user_net_init(struct net *net) | |||
2927 | if (nlsk == NULL) | 2927 | if (nlsk == NULL) |
2928 | return -ENOMEM; | 2928 | return -ENOMEM; |
2929 | net->xfrm.nlsk_stash = nlsk; /* Don't set to NULL */ | 2929 | net->xfrm.nlsk_stash = nlsk; /* Don't set to NULL */ |
2930 | rcu_assign_pointer(net->xfrm.nlsk, nlsk); | 2930 | RCU_INIT_POINTER(net->xfrm.nlsk, nlsk); |
2931 | return 0; | 2931 | return 0; |
2932 | } | 2932 | } |
2933 | 2933 | ||
@@ -2935,7 +2935,7 @@ static void __net_exit xfrm_user_net_exit(struct list_head *net_exit_list) | |||
2935 | { | 2935 | { |
2936 | struct net *net; | 2936 | struct net *net; |
2937 | list_for_each_entry(net, net_exit_list, exit_list) | 2937 | list_for_each_entry(net, net_exit_list, exit_list) |
2938 | rcu_assign_pointer(net->xfrm.nlsk, NULL); | 2938 | RCU_INIT_POINTER(net->xfrm.nlsk, NULL); |
2939 | synchronize_net(); | 2939 | synchronize_net(); |
2940 | list_for_each_entry(net, net_exit_list, exit_list) | 2940 | list_for_each_entry(net, net_exit_list, exit_list) |
2941 | netlink_kernel_release(net->xfrm.nlsk_stash); | 2941 | netlink_kernel_release(net->xfrm.nlsk_stash); |