aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sit.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/ipv6/sit.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/ipv6/sit.c')
-rw-r--r--net/ipv6/sit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 3b6dac956bb0..133768e52912 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_INIT_POINTER(*tp, t->next); 185 rcu_assign_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_INIT_POINTER(t->next, rtnl_dereference(*tp)); 195 rcu_assign_pointer(t->next, rtnl_dereference(*tp));
196 RCU_INIT_POINTER(*tp, t); 196 rcu_assign_pointer(*tp, t);
197} 197}
198 198
199static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn) 199static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn)
@@ -393,7 +393,7 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
393 p->addr = a->addr; 393 p->addr = a->addr;
394 p->flags = a->flags; 394 p->flags = a->flags;
395 t->prl_count++; 395 t->prl_count++;
396 RCU_INIT_POINTER(t->prl, p); 396 rcu_assign_pointer(t->prl, p);
397out: 397out:
398 return err; 398 return err;
399} 399}
@@ -1177,7 +1177,7 @@ static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
1177 if (!dev->tstats) 1177 if (!dev->tstats)
1178 return -ENOMEM; 1178 return -ENOMEM;
1179 dev_hold(dev); 1179 dev_hold(dev);
1180 RCU_INIT_POINTER(sitn->tunnels_wc[0], tunnel); 1180 rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
1181 return 0; 1181 return 0;
1182} 1182}
1183 1183