git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb7282d
)
datapath: Fix a double free bug for the sample action
author
Andy Zhou
<azhou@nicira.com>
Tue, 15 Apr 2014 23:28:15 +0000
(16:28 -0700)
committer
Andy Zhou
<azhou@nicira.com>
Wed, 16 Apr 2014 20:28:15 +0000
(13:28 -0700)
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.
datapath/actions.c
patch
|
blob
|
history
diff --git
a/datapath/actions.c
b/datapath/actions.c
index
0b66e7c
..
82cfd2d
100644
(file)
--- a/
datapath/actions.c
+++ b/
datapath/actions.c
@@
-552,6
+552,8
@@
static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
case OVS_ACTION_ATTR_SAMPLE:
err = sample(dp, skb, a);
+ if (unlikely(err)) /* skb already freed. */
+ return err;
break;
}