From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: tt.rantala@gmail.com, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
yoshfuji@linux-ipv6.org, kaber@trash.net, netdev@vger.kernel.org,
xeb@mail.ru
Subject: Re: [PATCH] ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
Date: Wed, 06 Feb 2013 16:02:36 -0500 (EST) [thread overview]
Message-ID: <20130206.160236.144295308153323655.davem@davemloft.net> (raw)
In-Reply-To: <1360157395.28557.30.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 06 Feb 2013 05:29:55 -0800
> 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>
Applied, thanks everyone.
prev parent reply other threads:[~2013-02-06 21:02 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
2013-02-06 21:02 ` David Miller [this message]
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=20130206.160236.144295308153323655.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--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