[ovs-dev] [PATCH] datapath-windows: Fix race condition when deleting internal ports
Anand Kumar
kumaranand at vmware.com
Thu Dec 27 18:29:09 UTC 2018
Acked-by: Anand Kumar <kumaranand at vmware.com>
Thanks,
Anand Kumar
On 12/21/18, 5:56 AM, "ovs-dev-bounces at openvswitch.org on behalf of Alin Gabriel Serdean" <ovs-dev-bounces at openvswitch.org on behalf of aserdean at ovn.org> wrote:
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 at ovn.org>
---
datapath-windows/ovsext/Vport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.16.1.windows.1
_______________________________________________
dev mailing list
dev at openvswitch.org
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fmailman%2Flistinfo%2Fovs-dev&data=02%7C01%7Ckumaranand%40vmware.com%7Cebdfb5ed4e7a4d43445108d6674c0aa0%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636809973664095278&sdata=VKRorIGV6IFhZ1kd6PPeQ22nNwzJok9WThrZxU0dedQ%3D&reserved=0
More information about the dev
mailing list