diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2016-04-08 22:55:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-17 00:23:01 +0200 |
commit | 0412bd931f5f94d1054e958415c4a945d8ee62f4 (patch) | |
tree | e7fe97a778ac5b9ce73d5e8becd5192d5924a734 /include/net/vxlan.h | |
parent | phy: make some bits preserved while setup forced mode (diff) | |
download | linux-0412bd931f5f94d1054e958415c4a945d8ee62f4.tar.xz linux-0412bd931f5f94d1054e958415c4a945d8ee62f4.zip |
vxlan: synchronously and race-free destruction of vxlan sockets
Due to the fact that the udp socket is destructed asynchronously in a
work queue, we have some nondeterministic behavior during shutdown of
vxlan tunnels and creating new ones. Fix this by keeping the destruction
process synchronous in regards to the user space process so IFF_UP can
be reliably set.
udp_tunnel_sock_release destroys vs->sock->sk if reference counter
indicates so. We expect to have the same lifetime of vxlan_sock and
vxlan_sock->sock->sk even in fast paths with only rcu locks held. So
only destruct the whole socket after we can be sure it cannot be found
by searching vxlan_net->sock_list.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jiri Benc <jbenc@redhat.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r-- | include/net/vxlan.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index 2f168f0ea32c..d442eb3129cd 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h @@ -184,9 +184,7 @@ struct vxlan_metadata { /* per UDP socket information */ struct vxlan_sock { struct hlist_node hlist; - struct work_struct del_work; struct socket *sock; - struct rcu_head rcu; struct hlist_head vni_list[VNI_HASH_SIZE]; atomic_t refcnt; u32 flags; |