diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/devinet.c | 2 | ||||
-rw-r--r-- | net/ipv4/fib_trie.c | 10 | ||||
-rw-r--r-- | net/ipv4/igmp.c | 8 | ||||
-rw-r--r-- | net/ipv4/ipip.c | 8 | ||||
-rw-r--r-- | net/ipv4/ipmr.c | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 65f01dc47565..e41c40f48cfe 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_INIT_POINTER(dev->ip_ptr, in_dev); | 261 | rcu_assign_pointer(dev->ip_ptr, in_dev); |
262 | out: | 262 | out: |
263 | return in_dev; | 263 | return in_dev; |
264 | out_kfree: | 264 | out_kfree: |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index d04b13ae18fe..2b555a5521e0 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -205,7 +205,7 @@ static inline struct tnode *node_parent_rcu(const struct rt_trie_node *node) | |||
205 | return (struct tnode *)(parent & ~NODE_TYPE_MASK); | 205 | return (struct tnode *)(parent & ~NODE_TYPE_MASK); |
206 | } | 206 | } |
207 | 207 | ||
208 | /* Same as RCU_INIT_POINTER | 208 | /* Same as rcu_assign_pointer |
209 | * but that macro() assumes that value is a pointer. | 209 | * but that macro() assumes that value is a pointer. |
210 | */ | 210 | */ |
211 | static inline void node_set_parent(struct rt_trie_node *node, struct tnode *ptr) | 211 | static inline void node_set_parent(struct rt_trie_node *node, struct tnode *ptr) |
@@ -529,7 +529,7 @@ static void tnode_put_child_reorg(struct tnode *tn, int i, struct rt_trie_node * | |||
529 | if (n) | 529 | if (n) |
530 | node_set_parent(n, tn); | 530 | node_set_parent(n, tn); |
531 | 531 | ||
532 | RCU_INIT_POINTER(tn->child[i], n); | 532 | rcu_assign_pointer(tn->child[i], n); |
533 | } | 533 | } |
534 | 534 | ||
535 | #define MAX_WORK 10 | 535 | #define MAX_WORK 10 |
@@ -1015,7 +1015,7 @@ static void trie_rebalance(struct trie *t, struct tnode *tn) | |||
1015 | 1015 | ||
1016 | tp = node_parent((struct rt_trie_node *) tn); | 1016 | tp = node_parent((struct rt_trie_node *) tn); |
1017 | if (!tp) | 1017 | if (!tp) |
1018 | RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); | 1018 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); |
1019 | 1019 | ||
1020 | tnode_free_flush(); | 1020 | tnode_free_flush(); |
1021 | if (!tp) | 1021 | if (!tp) |
@@ -1027,7 +1027,7 @@ static void trie_rebalance(struct trie *t, struct tnode *tn) | |||
1027 | if (IS_TNODE(tn)) | 1027 | if (IS_TNODE(tn)) |
1028 | tn = (struct tnode *)resize(t, (struct tnode *)tn); | 1028 | tn = (struct tnode *)resize(t, (struct tnode *)tn); |
1029 | 1029 | ||
1030 | RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); | 1030 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); |
1031 | tnode_free_flush(); | 1031 | tnode_free_flush(); |
1032 | } | 1032 | } |
1033 | 1033 | ||
@@ -1164,7 +1164,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen) | |||
1164 | put_child(t, (struct tnode *)tp, cindex, | 1164 | put_child(t, (struct tnode *)tp, cindex, |
1165 | (struct rt_trie_node *)tn); | 1165 | (struct rt_trie_node *)tn); |
1166 | } else { | 1166 | } else { |
1167 | RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); | 1167 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); |
1168 | tp = tn; | 1168 | tp = tn; |
1169 | } | 1169 | } |
1170 | } | 1170 | } |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 5104bc0bbdbe..450e5d21ed2a 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1249,7 +1249,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) | |||
1249 | 1249 | ||
1250 | im->next_rcu = in_dev->mc_list; | 1250 | im->next_rcu = in_dev->mc_list; |
1251 | in_dev->mc_count++; | 1251 | in_dev->mc_count++; |
1252 | RCU_INIT_POINTER(in_dev->mc_list, im); | 1252 | rcu_assign_pointer(in_dev->mc_list, im); |
1253 | 1253 | ||
1254 | #ifdef CONFIG_IP_MULTICAST | 1254 | #ifdef CONFIG_IP_MULTICAST |
1255 | igmpv3_del_delrec(in_dev, im->multiaddr); | 1255 | igmpv3_del_delrec(in_dev, im->multiaddr); |
@@ -1821,7 +1821,7 @@ int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr) | |||
1821 | iml->next_rcu = inet->mc_list; | 1821 | iml->next_rcu = inet->mc_list; |
1822 | iml->sflist = NULL; | 1822 | iml->sflist = NULL; |
1823 | iml->sfmode = MCAST_EXCLUDE; | 1823 | iml->sfmode = MCAST_EXCLUDE; |
1824 | RCU_INIT_POINTER(inet->mc_list, iml); | 1824 | rcu_assign_pointer(inet->mc_list, iml); |
1825 | ip_mc_inc_group(in_dev, addr); | 1825 | ip_mc_inc_group(in_dev, addr); |
1826 | err = 0; | 1826 | err = 0; |
1827 | done: | 1827 | done: |
@@ -2008,7 +2008,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct | |||
2008 | atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); | 2008 | atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); |
2009 | kfree_rcu(psl, rcu); | 2009 | kfree_rcu(psl, rcu); |
2010 | } | 2010 | } |
2011 | RCU_INIT_POINTER(pmc->sflist, newpsl); | 2011 | rcu_assign_pointer(pmc->sflist, newpsl); |
2012 | psl = newpsl; | 2012 | psl = newpsl; |
2013 | } | 2013 | } |
2014 | rv = 1; /* > 0 for insert logic below if sl_count is 0 */ | 2014 | rv = 1; /* > 0 for insert logic below if sl_count is 0 */ |
@@ -2111,7 +2111,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) | |||
2111 | } else | 2111 | } else |
2112 | (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, | 2112 | (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, |
2113 | 0, NULL, 0); | 2113 | 0, NULL, 0); |
2114 | RCU_INIT_POINTER(pmc->sflist, newpsl); | 2114 | rcu_assign_pointer(pmc->sflist, newpsl); |
2115 | pmc->sfmode = msf->imsf_fmode; | 2115 | pmc->sfmode = msf->imsf_fmode; |
2116 | err = 0; | 2116 | err = 0; |
2117 | done: | 2117 | done: |
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 413ed1ba7a5a..22a199315309 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_INIT_POINTER(*tp, t->next); | 234 | rcu_assign_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_INIT_POINTER(t->next, rtnl_dereference(*tp)); | 244 | rcu_assign_pointer(t->next, rtnl_dereference(*tp)); |
245 | RCU_INIT_POINTER(*tp, t); | 245 | rcu_assign_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, |
@@ -792,7 +792,7 @@ static int __net_init ipip_fb_tunnel_init(struct net_device *dev) | |||
792 | return -ENOMEM; | 792 | return -ENOMEM; |
793 | 793 | ||
794 | dev_hold(dev); | 794 | dev_hold(dev); |
795 | RCU_INIT_POINTER(ipn->tunnels_wc[0], tunnel); | 795 | rcu_assign_pointer(ipn->tunnels_wc[0], tunnel); |
796 | return 0; | 796 | return 0; |
797 | } | 797 | } |
798 | 798 | ||
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 8e54490ee3f4..7bc2db6db8d4 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1225,7 +1225,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsi | |||
1225 | 1225 | ||
1226 | ret = ip_ra_control(sk, 1, mrtsock_destruct); | 1226 | ret = ip_ra_control(sk, 1, mrtsock_destruct); |
1227 | if (ret == 0) { | 1227 | if (ret == 0) { |
1228 | RCU_INIT_POINTER(mrt->mroute_sk, sk); | 1228 | rcu_assign_pointer(mrt->mroute_sk, sk); |
1229 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)++; | 1229 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)++; |
1230 | } | 1230 | } |
1231 | rtnl_unlock(); | 1231 | rtnl_unlock(); |