Fix a bug where skb_clone() NULL check is missing in sample action
implementation.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
skb_get(skb);
} else {
sample_skb = skb_clone(skb, GFP_ATOMIC);
skb_get(skb);
} else {
sample_skb = skb_clone(skb, GFP_ATOMIC);
+ if (!sample_skb)
+ /* Skip the sample action when out of memory. */
+ return 0;
}
/* Note that do_execute_actions() never consumes skb.
}
/* Note that do_execute_actions() never consumes skb.