diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-11-07 10:34:46 -0600 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-11-07 10:34:46 -0600 |
commit | b5480950c6cbb7b07ab1c1a5af0dc661a1cb6f24 (patch) | |
tree | b5fcb00387a838beb2bcf2f8ed2fd3d6d460c8ae /drivers/net/vxlan.c | |
parent | e363bbac316ffb5daaf45d855f82680148cafe20 (diff) | |
parent | 355e62f5ad12b005c862838156262eb2df2f8dff (diff) | |
download | blackbird-op-linux-b5480950c6cbb7b07ab1c1a5af0dc661a1cb6f24.tar.gz blackbird-op-linux-b5480950c6cbb7b07ab1c1a5af0dc661a1cb6f24.zip |
Merge remote-tracking branch 'grant/devicetree/next' into for-next
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index d1292fe746bc..2ef5b6219f3f 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -952,8 +952,7 @@ void vxlan_sock_release(struct vxlan_sock *vs) spin_lock(&vn->sock_lock); hlist_del_rcu(&vs->hlist); - smp_wmb(); - vs->sock->sk->sk_user_data = NULL; + rcu_assign_sk_user_data(vs->sock->sk, NULL); vxlan_notify_del_rx_port(sk); spin_unlock(&vn->sock_lock); @@ -1048,8 +1047,7 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb) port = inet_sk(sk)->inet_sport; - smp_read_barrier_depends(); - vs = (struct vxlan_sock *)sk->sk_user_data; + vs = rcu_dereference_sk_user_data(sk); if (!vs) goto drop; @@ -2302,8 +2300,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, __be16 port, atomic_set(&vs->refcnt, 1); vs->rcv = rcv; vs->data = data; - smp_wmb(); - vs->sock->sk->sk_user_data = vs; + rcu_assign_sk_user_data(vs->sock->sk, vs); spin_lock(&vn->sock_lock); hlist_add_head_rcu(&vs->hlist, vs_head(net, port)); |