diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-01-12 04:41:32 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-12 12:26:56 -0800 |
commit | cf778b00e96df6d64f8e21b8395d1f8a859ecdc7 (patch) | |
tree | 4cc157d564bd65d687bdf722af3202e9e277ea98 /net/socket.c | |
parent | 9ee6045f09a7875ebe55b9942b232a19076b157b (diff) | |
download | linux-3.10-cf778b00e96df6d64f8e21b8395d1f8a859ecdc7.tar.gz linux-3.10-cf778b00e96df6d64f8e21b8395d1f8a859ecdc7.tar.bz2 linux-3.10-cf778b00e96df6d64f8e21b8395d1f8a859ecdc7.zip |
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/socket.c')
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index e56162cd65b..28a96af484b 100644 --- a/net/socket.c +++ b/net/socket.c @@ -2492,7 +2492,7 @@ int sock_register(const struct net_proto_family *ops) lockdep_is_held(&net_family_lock))) err = -EEXIST; else { - RCU_INIT_POINTER(net_families[ops->family], ops); + rcu_assign_pointer(net_families[ops->family], ops); err = 0; } spin_unlock(&net_family_lock); |