summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Datapath.h
diff options
context:
space:
mode:
authorSorin Vinturis <svinturis@cloudbasesolutions.com>2015-01-26 19:00:40 +0000
committerBen Pfaff <blp@nicira.com>2015-01-30 13:26:57 -0800
commit448d667b7b9b1d7ebd9b4cb3338ffea33158c579 (patch)
tree6e7ca1a356cfb2df7b4a799e83677124d9169188 /datapath-windows/ovsext/Datapath.h
parent7be0b8a0b0703719397763b3b588720f3b25ec13 (diff)
downloadopenvswitch-448d667b7b9b1d7ebd9b4cb3338ffea33158c579.tar.gz
datapath-windows: Solved BSOD when loading an activated extension
If the OVS extension was previously enabled and the driver unloaded, when the driver is loaded again a BSOD is triggered. This happens because the OVS extension registers its FilterXxx routines to NDIS, by calling NdisFRegisterFilterDriver, before performing all the necessary initialization. Because drivers that call NdisFRegisterFilterDriver must be prepared for an immediate call to any of their FilterXxx functions. The BSOD is triggered because the FilterAttach routine, OvsExtAttach, tries to acquire the control lock, when the lock is not yet initialized. This happens because the FilterAttach is called before the driver finishes initialization, in OvsInit(). The solution is to perform all necessary initialization before registering OVS FilterXxx routines. If device object creation fails, all allocated resources during init phase are released by calling OvsCleanup and NdisFDeregisterFilterDriver functions. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/67 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Datapath.h')
-rw-r--r--datapath-windows/ovsext/Datapath.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Datapath.h b/datapath-windows/ovsext/Datapath.h
index 2e3bac58f..ba31ece4b 100644
--- a/datapath-windows/ovsext/Datapath.h
+++ b/datapath-windows/ovsext/Datapath.h
@@ -81,6 +81,8 @@ typedef struct _OVS_OPEN_INSTANCE {
NDIS_STATUS OvsCreateDeviceObject(NDIS_HANDLE ovsExtDriverHandle);
VOID OvsDeleteDeviceObject();
+VOID OvsInit();
+VOID OvsCleanup();
POVS_OPEN_INSTANCE OvsGetOpenInstance(PFILE_OBJECT fileObject,
UINT32 dpNo);