It is my understanding that on error execute_recirc() does not free the
skb passed to it.

Assuming this is true then on error skb should always be freed
if an error occurs in execute_recirc().

And if recirc_skb differs from skb, because it is a clone of skb,
then it should also be freed.

Signed-off-by: Simon Horman <ho...@verge.net.au>
---
 datapath/actions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index 7fe2f54..ffff56d 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -596,8 +596,8 @@ static int do_execute_actions(struct datapath *dp, struct 
sk_buff *skb,
 
                        err = execute_recirc(dp, recirc_skb, a);
 
-                       if (last_action || err)
-                               return err;
+                       if (unlikely(err && recirc_skb != skb))
+                               kfree_skb(recirc_skb);
 
                        break;
                }
-- 
1.8.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to