From: we...@ucloud.cn
Date: Fri, 18 Jan 2019 20:13:15 +0800

> From: wenxu <we...@ucloud.cn>
> 
> Fixes: 862a03c ("gre: refactor the gre_fb_xmit")
>        1a66a83 ("gre: add collect_md mode to ERSPAN tunnel")
> 
> Signed-off-by: wenxu <we...@ucloud.cn>
> ---
>  net/ipv4/ip_gre.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index d1d09f3..970500a 100644
> --- a/net/ipv4/ip_gre.c
> +++ b/net/ipv4/ip_gre.c
> @@ -544,7 +544,7 @@ static void gre_fb_xmit(struct sk_buff *skb, struct 
> net_device *dev,
>  
>       rt = prepare_fb_xmit(skb, dev, &fl, tunnel_hlen);
>       if (!rt)
> -             return;
> +             goto err_free_skb;
>  

prepare_fb_xmit() frees the SKB when it returns NULL, so your change will free
the SKB twice.

I'm not applying this.

Reply via email to