aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2014-05-06 20:23:48 -0400
committerPravin B Shelar <pshelar@nicira.com>2014-06-29 17:10:43 -0400
commitfe984c08e20f0fc2b4666bf8eeeb02605568387b (patch)
tree671315d3508f8a202c4187062a83ab24beed0e7f /net
parentdba63115ce0c888fcb4cdec3f8a4ba97d144afaf (diff)
openvswitch: Fix a double free bug for the sample action
When sample action returns with an error, the skb has already been freed. This patch fix a bug to make sure we don't free it again. This bug introduced by commit ccb1352e76cff05 (net: Add Open vSwitch kernel components.) Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'net')
-rw-r--r--net/openvswitch/actions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index c36856a457ca..e70d8b18e962 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -551,6 +551,8 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
551 551
552 case OVS_ACTION_ATTR_SAMPLE: 552 case OVS_ACTION_ATTR_SAMPLE:
553 err = sample(dp, skb, a); 553 err = sample(dp, skb, a);
554 if (unlikely(err)) /* skb already freed. */
555 return err;
554 break; 556 break;
555 } 557 }
556 558