From 3b60a203ed3a6ccc804c24468942db10d035a25a Mon Sep 17 00:00:00 2001 From: Sorin Vinturis Date: Wed, 19 Nov 2014 07:16:32 +0000 Subject: datapath-windows: Avoid BSOD when switch context is NULL I came around a BSOD that happened when trying to access pidHashLock from the gOvsSwitchContext, which was NULL. The stop happened in OvsAcquirePidHashLock function. To reproduce this BSOD, make sure the extension is enabled and running, disable it and, after that, execute 'ovs-dpctl.exe show'. The BSOD is triggered afterwards. Signed-off-by: Sorin Vinturis Reported-by: Sorin Vinturis Reported-at: https://github.com/openvswitch/ovs-issues/issues/53 Acked-by: Eitan Eliahu Acked-by: Nithin Raju Signed-off-by: Gurucharan Shetty --- datapath-windows/ovsext/Tunnel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'datapath-windows/ovsext/Tunnel.c') diff --git a/datapath-windows/ovsext/Tunnel.c b/datapath-windows/ovsext/Tunnel.c index b55a223c6..fed58f1c3 100644 --- a/datapath-windows/ovsext/Tunnel.c +++ b/datapath-windows/ovsext/Tunnel.c @@ -224,9 +224,10 @@ OvsInjectPacketThroughActions(PNET_BUFFER_LIST pNbl, OvsCompletionList completionList; KIRQL irql; ULONG SendFlags = NDIS_SEND_FLAGS_SWITCH_DESTINATION_GROUP; - OVS_DATAPATH *datapath = &gOvsSwitchContext->datapath; + OVS_DATAPATH *datapath = NULL; ASSERT(gOvsSwitchContext); + datapath = &gOvsSwitchContext->datapath; /* Fill the tunnel key */ status = OvsSlowPathDecapVxlan(pNbl, &tunnelKey); -- cgit v1.2.1