On 15.04.2016 22:36, David Miller wrote:
From: Hannes Frederic Sowa <han...@stressinduktion.org>
Date: Fri,  8 Apr 2016 22:55:01 +0200

@@ -1053,7 +1052,9 @@ static void __vxlan_sock_release(struct vxlan_sock *vs)
        vxlan_notify_del_rx_port(vs);
        spin_unlock(&vn->sock_lock);

-       queue_work(vxlan_wq, &vs->del_work);
+       synchronize_net();
+       udp_tunnel_sock_release(vs->sock);
+       kfree(vs);
  }

  static void vxlan_sock_release(struct vxlan_dev *vxlan)

I just want to make sure you saw this change in net-next:

====================
commit ca065d0cf80fa547724440a8bf37f1e674d917c0
Author: Eric Dumazet <eduma...@google.com>
Date:   Fri Apr 1 08:52:13 2016 -0700

     udp: no longer use SLAB_DESTROY_BY_RCU
====================

Does that effect your change?

I have seen this patch and it does not affect this patch:

The socket is matched from the net->vxlan_net->hlist in fast path. I don't want to destruct (kern_sock_shutdown) the socket while packets could be in flight through the vxlan stack. We clean up socket memory and destruct after rcu again, but given that we only do this during ifdown of a vxlan interface I don't see that we need to optimize this again.

All other tunneling protocols don't look up sockets in fast path, so they don't need to protect against this.

Bye,
Hannes

Reply via email to