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.
Signed-off-by: Andy Zhou <[email protected]> --- datapath/actions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datapath/actions.c b/datapath/actions.c index 0b66e7c..82cfd2d 100644 --- 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; } -- 1.9.1 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
