aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
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/core
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/core')
-rw-r--r--net/core/net-sysfs.c6
-rw-r--r--net/core/netpoll.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index abf4393a77b3..f3dbd4f596a4 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1177,9 +1177,9 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
1177 nonempty = 1; 1177 nonempty = 1;
1178 } 1178 }
1179 1179
1180 if (nonempty) 1180 if (nonempty) {
1181 RCU_INIT_POINTER(dev->xps_maps, new_dev_maps); 1181 rcu_assign_pointer(dev->xps_maps, new_dev_maps);
1182 else { 1182 } else {
1183 kfree(new_dev_maps); 1183 kfree(new_dev_maps);
1184 RCU_INIT_POINTER(dev->xps_maps, NULL); 1184 RCU_INIT_POINTER(dev->xps_maps, NULL);
1185 } 1185 }
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 0d38808a2305..556b08298669 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -765,7 +765,7 @@ int __netpoll_setup(struct netpoll *np)
765 } 765 }
766 766
767 /* last thing to do is link it to the net device structure */ 767 /* last thing to do is link it to the net device structure */
768 RCU_INIT_POINTER(ndev->npinfo, npinfo); 768 rcu_assign_pointer(ndev->npinfo, npinfo);
769 769
770 return 0; 770 return 0;
771 771