aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipip.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-01-11 23:41:32 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-12 15:26:56 -0500
commitcf778b00e96df6d64f8e21b8395d1f8a859ecdc7 (patch)
tree4cc157d564bd65d687bdf722af3202e9e277ea98 /net/ipv4/ipip.c
parent9ee6045f09a7875ebe55b9942b232a19076b157b (diff)
net: reintroduce missing rcu_assign_pointer() calls
commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER) did a lot of incorrect changes, since it did a complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x, y). We miss needed barriers, even on x86, when y is not NULL. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Stephen Hemminger <shemminger@vyatta.com> CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r--net/ipv4/ipip.c8
1 files changed, 4 insertions, 4 deletions
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
248static struct ip_tunnel * ipip_tunnel_locate(struct net *net, 248static 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