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>
} while (error);
if (error) {
- OvsTunnelFilterCompleteRequest(irp, callback, tunnelContext, status);
if (request) {
OvsFreeMemory(request);
request = NULL;
{
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;
dstPort,
OvsTunnelVportPendingInit,
(PVOID)tunnelContext);
+ if (status != STATUS_PENDING) {
+ OvsFreeMemoryWithTag(tunnelContext, OVS_VPORT_POOL_TAG);
+ tunnelContext = NULL;
+ }
break;
}
case OVS_VPORT_TYPE_STT: