2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 09:13:55 +08:00

openvswitch: Add skb_clone NULL check for the sampling action.

Fix a bug where skb_clone() NULL check is missing in sample action
implementation.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
Andy Zhou 2014-07-17 15:17:54 -07:00 committed by Pravin B Shelar
parent 651887b0c2
commit d9e0ecb814

View File

@ -477,6 +477,8 @@ static int sample(struct datapath *dp, struct sk_buff *skb,
skb_get(skb);
} else {
sample_skb = skb_clone(skb, GFP_ATOMIC);
if (!sample_skb) /* Skip sample action when out of memory. */
return 0;
}
/* Note that do_execute_actions() never consumes skb.