[ovs-dev] [PATCH] datapath-windows: Fix recirculation when it is not the last attribute

Nithin Raju nithin at vmware.com
Wed Apr 27 00:01:31 UTC 2016


Thans for the fix.

Acked-by: Nithin Raju <nithin at vmware.com>

-----Original Message-----
From: dev <dev-bounces at openvswitch.org> on behalf of Sairam Venugopal
<vsairam at vmware.com>
Date: Tuesday, April 26, 2016 at 4:53 PM
To: "dev at openvswitch.org" <dev at openvswitch.org>
Subject: [ovs-dev] [PATCH] datapath-windows: Fix recirculation when it
is	not the last attribute

>When the recirc action is in middle, the current code creates a clone of
>the NBL. However, it overwrites the pointer to point to the cloned NBL
>without completing it. This causes a memory leak that crashes the kernel.
>
>Signed-off-by: Sairam Venugopal <vsairam at vmware.com>
>---
> datapath-windows/ovsext/Actions.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>diff --git a/datapath-windows/ovsext/Actions.c
>b/datapath-windows/ovsext/Actions.c
>index 5dae6b4..5ad29ee 100644
>--- a/datapath-windows/ovsext/Actions.c
>+++ b/datapath-windows/ovsext/Actions.c
>@@ -1557,10 +1557,14 @@ OvsExecuteRecirc(OvsForwardingContext *ovsFwdCtx,
>             ovsActionStats.noCopiedNbl++;
>             return NDIS_STATUS_SUCCESS;
>         }
>-        ovsFwdCtx->curNbl = newNbl;
>     }
> 
>-    deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key, NULL);
>+    if (newNbl) {
>+        deferredAction = OvsAddDeferredActions(newNbl, key, NULL);
>+    } else {
>+        deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key,
>NULL);
>+    }
>+
>     if (deferredAction) {
>         deferredAction->key.recircId = NlAttrGetU32(actions);
>     } else {
>-- 
>1.9.5.msysgit.0
>
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma
>n_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=pN
>HQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=mp-I9a4bh0khikMfErkQfKi0MxEFbe
>WI0dOhNBsCSPo&s=gjRuXLD5XalccxouZ4ka8mIV0LaeH4__y6P_sRC6DFw&e= 




More information about the dev mailing list