summaryrefslogtreecommitdiff
path: root/datapath-windows
diff options
context:
space:
mode:
authorAlin Gabriel Serdean <aserdean@ovn.org>2018-12-21 15:55:27 +0200
committerAlin Gabriel Serdean <aserdean@ovn.org>2018-12-28 16:43:48 +0200
commitd4484c21fc07df2db17d747a06870e335b597df4 (patch)
tree8627ad6983521c95855cef9758530eee8508a923 /datapath-windows
parent4df926916ccd2a64528f4d9b19ef97042e51cab4 (diff)
downloadopenvswitch-d4484c21fc07df2db17d747a06870e335b597df4.tar.gz
datapath-windows: Fix race condition when deleting internal ports
We need to hold the port lock until all the operations with a port are completed. Found by inspection. Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org> Acked-by: Anand Kumar <kumaranand@vmware.com>
Diffstat (limited to 'datapath-windows')
-rw-r--r--datapath-windows/ovsext/Vport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index 380870a11..e08cb90ce 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
@@ -632,13 +632,13 @@ HvDisconnectNic(POVS_SWITCH_CONTEXT switchContext,
OvsRemoveAndDeleteVport(NULL, switchContext, vport, FALSE, TRUE);
OvsPostVportEvent(&event);
}
- NdisReleaseRWLock(switchContext->dispatchLock, &lockState);
if (isInternalPort) {
OvsInternalAdapterDown(vport->portNo, vport->netCfgInstanceId);
OvsRemoveAndDeleteVport(NULL, switchContext, vport, TRUE, TRUE);
OvsPostVportEvent(&event);
}
+ NdisReleaseRWLock(switchContext->dispatchLock, &lockState);
done:
VPORT_NIC_EXIT(nicParam);