datapath: Backport: openvswitch: fix hangup on vxlan/gre/geneve device deletion
authorPravin B Shelar <pshelar@nicira.com>
Tue, 8 Dec 2015 02:23:18 +0000 (18:23 -0800)
committerPravin B Shelar <pshelar@nicira.com>
Tue, 8 Dec 2015 17:48:03 +0000 (09:48 -0800)
commit1e41fa16f0e4342473a3642286b8aa7d887d3dde
tree96cf23d03e92963908ba1554f05f54f3017fa9b0
parent8f3012d8e90f8b795a78143b9db283724e81a495
datapath: Backport: openvswitch: fix hangup on vxlan/gre/geneve device deletion

Upstream commit:

    Each openvswitch tunnel vport (vxlan,gre,geneve) holds a reference
    to the underlying tunnel device, but never released it when such
    device is deleted.
    Deleting the underlying device via the ip tool cause the kernel to
    hangup in the netdev_wait_allrefs() loop.
    This commit ensure that on device unregistration dp_detach_port_notify()
    is called for all vports that hold the device reference, properly
    releasing it.

    Fixes: 614732eaa12d ("openvswitch: Use regular VXLAN net_device device")
    Fixes: b2acd1dc3949 ("openvswitch: Use regular GRE net_device instead of vport")
    Fixes: 6b001e682e90 ("openvswitch: Use Geneve device.")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream: 131753030("openvswitch: fix hangup on vxlan/gre/geneve device
deletion").
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@kernel.org>
datapath/dp_notify.c
datapath/vport-netdev.c