[ovs-dev] [PATCH] datapath: Use kfree_skb() only on error paths.

Ben Pfaff blp at nicira.com
Thu Oct 20 04:46:56 UTC 2011


Signed-off-by: Ben Pfaff <blp at nicira.com>
---
Arguably the call to dp_upcall() in dp_process_received_packet()
should also be followed by consume_skb() instead of kfree_skb().
And I see that fragment() in vport-capwap.c uses kfree_skb() from
its "out" label that is used for both success and failure paths.

diff --git a/datapath/datapath.c b/datapath/datapath.c
index cd29482..01d0dd7 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -389,7 +389,7 @@ int dp_upcall(struct datapath *dp, struct sk_buff *skb,
 		/* Free GSO-segments */
 		do {
 			next = segs->next;
-			kfree_skb(segs);
+			consume_skb(segs);
 		} while ((segs = next) != NULL);
 	}
 
-- 
1.7.2.5




More information about the dev mailing list