[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALDO+Sb9ypvY1rsngHGMbFBDt8-rKcuVKrk8T1+ohSYXHhFMnQ@mail.gmail.com>
Date: Sat, 14 Sep 2019 08:12:02 -0700
From: William Tu <u9012063@...il.com>
To: Xin Long <lucien.xin@...il.com>
Cc: network dev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] ip6_gre: fix a dst leak in ip6erspan_tunnel_xmit
On Fri, Sep 13, 2019 at 2:45 AM Xin Long <lucien.xin@...il.com> wrote:
>
> In ip6erspan_tunnel_xmit(), if the skb will not be sent out, it has to
> be freed on the tx_err path. Otherwise when deleting a netns, it would
> cause dst/dev to leak, and dmesg shows:
>
> unregister_netdevice: waiting for lo to become free. Usage count = 1
>
> Fixes: ef7baf5e083c ("ip6_gre: add ip6 erspan collect_md mode")
> Signed-off-by: Xin Long <lucien.xin@...il.com>
> ---
LGTM, thanks for the fix!
Acked-by: William Tu <u9012063@...il.com>
> net/ipv6/ip6_gre.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
> index dd2d0b96..d5779d6 100644
> --- a/net/ipv6/ip6_gre.c
> +++ b/net/ipv6/ip6_gre.c
> @@ -968,7 +968,7 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
> if (unlikely(!tun_info ||
> !(tun_info->mode & IP_TUNNEL_INFO_TX) ||
> ip_tunnel_info_af(tun_info) != AF_INET6))
> - return -EINVAL;
> + goto tx_err;
>
> key = &tun_info->key;
> memset(&fl6, 0, sizeof(fl6));
> --
> 2.1.0
>
Powered by blists - more mailing lists