On Thu, Jul 10, 2014 at 1:16 AM, Andy Zhou <az...@nicira.com> wrote:
> Fix a bug where skb_clone() NULL check is missing in sample action
> implementation.
>
> Signed-off-by: Andy Zhou <az...@nicira.com>
> ---
>  datapath/actions.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/datapath/actions.c b/datapath/actions.c
> index 5cd7492..daa7b43 100644
> --- a/datapath/actions.c
> +++ b/datapath/actions.c
> @@ -576,6 +576,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)
> +                       return -ENOMEM;
>         }
>
>         /* Note that do_execute_actions() never consumes skb.
> --

Same as recirc, can you continue with rest of actions?

otherwise looks good.

Acked-by: Pravin B Shelar <pshe...@nicira.com>
Thanks.
> 1.9.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to