When the filter detach routine is called while there are packets
still in processing, the OvsUninitSwitchContext function call will
decrement the switch context reference count without releasing the
switch context structure. This behaviour is correct and expected,
but the BSOD is caused in this case because the gOvsSwitchContext
variable is set to NULL, which is wrong.
The gOvsSwitchContext global variable must be set to NULL only when
the switch context structure is actually released.
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/80
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
status = OvsInitSwitchContext(switchContext);
if (status != NDIS_STATUS_SUCCESS) {
OvsFreeMemoryWithTag(switchContext, OVS_SWITCH_POOL_TAG);
+ switchContext = NULL;
goto create_switch_done;
}
}
OvsDeleteSwitch(switchContext);
OvsCleanupIpHelper();
- gOvsSwitchContext = NULL;
/* This completes the cleanup, and a new attach can be handled now. */
OVS_LOG_TRACE("Exit: OvsDetach Successfully");
if (ref == 1) {
OvsDeleteSwitchContext(switchContext);
+ gOvsSwitchContext = NULL;
}
}