From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tommi Rantala <tt.rantala@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>,
netdev@vger.kernel.org, Dmitry Kozlov <xeb@mail.ru>
Subject: Re: [PATCH] ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
Date: Wed, 06 Feb 2013 05:29:55 -0800 [thread overview]
Message-ID: <1360157395.28557.30.camel@edumazet-glaptop> (raw)
In-Reply-To: <1360157042-16473-1-git-send-email-tt.rantala@gmail.com>
On Wed, 2013-02-06 at 15:24 +0200, Tommi Rantala wrote:
> ip6gre_tunnel_xmit() is leaking the skb when we hit this error branch,
> and the -1 return value from this function is bogus. Use the error
> handling we already have in place in ip6gre_tunnel_xmit() for this error
> case to fix this.
>
> Signed-off-by: Tommi Rantala <tt.rantala@gmail.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 c727e47..131dd09 100644
> --- a/net/ipv6/ip6_gre.c
> +++ b/net/ipv6/ip6_gre.c
> @@ -960,7 +960,7 @@ static netdev_tx_t ip6gre_tunnel_xmit(struct sk_buff *skb,
> int ret;
>
> if (!ip6_tnl_xmit_ctl(t))
> - return -1;
> + goto tx_err;
>
> switch (skb->protocol) {
> case htons(ETH_P_IP):
Acked-by: Eric Dumazet <edumazet@google.com>
Thanks Tommi
next prev parent reply other threads:[~2013-02-06 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 13:24 [PATCH] ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit() Tommi Rantala
2013-02-06 13:29 ` Eric Dumazet [this message]
2013-02-06 21:02 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360157395.28557.30.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=tt.rantala@gmail.com \
--cc=xeb@mail.ru \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox