Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe984c08 authored by Andy Zhou's avatar Andy Zhou Committed by Pravin B Shelar
Browse files

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 ccb1352e (net: Add Open vSwitch
kernel components.)

Signed-off-by: default avatarAndy Zhou <azhou@nicira.com>
Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
parent dba63115
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -551,6 +551,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;
		}