[ovs-dev] [PATCH] datapath-windows: conntrack leaks

Sairam Venugopal vsairam at vmware.com
Tue Nov 29 18:23:31 UTC 2016


Acked-by: Sairam Venugopal <vsairam at vmware.com>


On 11/28/16, 6:26 AM, "Alin Serdean" <aserdean at cloudbasesolutions.com>
wrote:

>All conntrack entries should be removed before unloading/disabling the
>driver.
>
>This patch forces a flush of all the entries during the cleanup routine.
>
>The bug was found using driver verifier.
>
>Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
>---
> datapath-windows/ovsext/Conntrack.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/datapath-windows/ovsext/Conntrack.c
>b/datapath-windows/ovsext/Conntrack.c
>index 56a7cbc..f482783 100644
>--- a/datapath-windows/ovsext/Conntrack.c
>+++ b/datapath-windows/ovsext/Conntrack.c
>@@ -42,6 +42,8 @@ static PNDIS_RW_LOCK_EX ovsConntrackLockObj;
> extern POVS_SWITCH_CONTEXT gOvsSwitchContext;
> static UINT64 ctTotalEntries;
> 
>+static __inline NDIS_STATUS OvsCtFlush(UINT16 zone);
>+
> /*
>  
>*-------------------------------------------------------------------------
>---
>  * OvsInitConntrack
>@@ -117,6 +119,9 @@ OvsCleanupConntrack(VOID)
>                           KernelMode, FALSE, NULL);
>     ObDereferenceObject(ctThreadCtx.threadObject);
> 
>+    /* Force flush all entries before removing */
>+    OvsCtFlush(0);
>+
>     if (ovsConntrackTable) {
>         OvsFreeMemoryWithTag(ovsConntrackTable, OVS_CT_POOL_TAG);
>         ovsConntrackTable = NULL;
>-- 
>2.10.2.windows.1
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_
>mailman_listinfo_ovs-2Ddev&d=DgICAg&c=uilaK90D4TOVoH58JNXRgQ&r=Z6vowHUOjP5
>ysP_g372c49Nqc1vEKqHKNBkR5Q5Z7uo&m=YwYsigaUYWgveMwCzujBjqz3KqEspWrBeE5w6HP
>nHEc&s=Ow2HR_t1p-fHBAYFikzK-mUTLa_RMJhqoEi2XkUHXPk&e= 



More information about the dev mailing list