summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Vport.c
diff options
context:
space:
mode:
authorSorin Vinturis <svinturis@cloudbasesolutions.com>2015-07-28 10:04:07 +0000
committerBen Pfaff <blp@nicira.com>2015-07-28 08:08:04 -0700
commit1d3950e900da0f1ac05c77d7da8c061fc88ad6a9 (patch)
tree8819c831c988968a61735b244997887071df155d /datapath-windows/ovsext/Vport.c
parent7ad705c65faefd75f116c8fad9f18c67a0fb98bb (diff)
downloadopenvswitch-1d3950e900da0f1ac05c77d7da8c061fc88ad6a9.tar.gz
datapath-windows: Avoid BSOD when cleaning up a tunnel vport
If an error appears when creating a tunnel vport the cleanup is performed twice, which causes the tunnel vport to be released also twice and generate a BSOD. This patch modifies the tunnel filter cleanup logic to avoid this issue. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/97 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Vport.c')
-rw-r--r--datapath-windows/ovsext/Vport.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index d9f489fe7..b2ff3086d 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
@@ -920,7 +920,8 @@ OvsInitTunnelVport(PVOID userContext,
{
POVS_TUNFLT_INIT_CONTEXT tunnelContext = NULL;
- tunnelContext = OvsAllocateMemory(sizeof(*tunnelContext));
+ tunnelContext = OvsAllocateMemoryWithTag(sizeof(*tunnelContext),
+ OVS_VPORT_POOL_TAG);
if (tunnelContext == NULL) {
status = STATUS_INSUFFICIENT_RESOURCES;
break;
@@ -935,6 +936,10 @@ OvsInitTunnelVport(PVOID userContext,
dstPort,
OvsTunnelVportPendingInit,
(PVOID)tunnelContext);
+ if (status != STATUS_PENDING) {
+ OvsFreeMemoryWithTag(tunnelContext, OVS_VPORT_POOL_TAG);
+ tunnelContext = NULL;
+ }
break;
}
case OVS_VPORT_TYPE_STT: