datapath-windows: Solved BSOD when cleaning up the VXLAN tunnel
authorSorin Vinturis <svinturis@cloudbasesolutions.com>
Fri, 10 Jul 2015 08:26:51 +0000 (08:26 +0000)
committerBen Pfaff <blp@nicira.com>
Wed, 15 Jul 2015 15:53:48 +0000 (08:53 -0700)
When removing vport also remove the vxlan tunnel port.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/94
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/Vport.c
datapath-windows/ovsext/Vxlan.c

index 4315464..d692a6d 100644 (file)
@@ -2531,6 +2531,12 @@ OvsTunnelVportPendingRemove(PVOID context,
     RemoveEntryList(&vport->ovsNameLink);
     RemoveEntryList(&vport->portNoLink);
     RemoveEntryList(&vport->tunnelVportLink);
+
+    if (vport->priv) {
+        OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
+        vport->priv = NULL;
+    }
+
     OvsFreeMemoryWithTag(vport, OVS_VPORT_POOL_TAG);
 
     NdisReleaseRWLock(switchContext->dispatchLock, &lockState);
index f43805a..b84c1d0 100644 (file)
@@ -154,11 +154,11 @@ OvsCleanupVxlanTunnel(PIRP irp,
                                       vxlanPort->filterID,
                                       callback,
                                       tunnelContext);
+    } else {
+        OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
+        vport->priv = NULL;
     }
 
-    OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
-    vport->priv = NULL;
-
     return status;
 }