public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipv6-multicast:  Fix memory leak in input path.
@ 2011-09-27 18:58 greearb
  2011-09-27 19:16 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: greearb @ 2011-09-27 18:58 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

Have to free the skb before returning if we fail
the fib lookup.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 e9a8df9... 86e3cc1... M	net/ipv6/ip6mr.c
 net/ipv6/ip6mr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index e9a8df9..86e3cc1 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -2053,8 +2053,10 @@ int ip6_mr_input(struct sk_buff *skb)
 	int err;
 
 	err = ip6mr_fib_lookup(net, &fl6, &mrt);
-	if (err < 0)
+	if (err < 0) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	read_lock(&mrt_lock);
 	cache = ip6mr_cache_find(mrt,
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ipv6-multicast: Fix memory leak in input path.
  2011-09-27 18:58 [PATCH] ipv6-multicast: Fix memory leak in input path greearb
@ 2011-09-27 19:16 ` David Miller
  2011-09-27 19:34   ` Ben Greear
  2012-02-02 17:26   ` Ben Greear
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2011-09-27 19:16 UTC (permalink / raw)
  To: greearb; +Cc: netdev

From: greearb@candelatech.com
Date: Tue, 27 Sep 2011 11:58:17 -0700

> From: Ben Greear <greearb@candelatech.com>
> 
> Have to free the skb before returning if we fail
> the fib lookup.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ipv6-multicast: Fix memory leak in input path.
  2011-09-27 19:16 ` David Miller
@ 2011-09-27 19:34   ` Ben Greear
  2011-09-27 20:08     ` Eric Dumazet
  2012-02-02 17:26   ` Ben Greear
  1 sibling, 1 reply; 6+ messages in thread
From: Ben Greear @ 2011-09-27 19:34 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On 09/27/2011 12:16 PM, David Miller wrote:
> From: greearb@candelatech.com
> Date: Tue, 27 Sep 2011 11:58:17 -0700
>
>> From: Ben Greear<greearb@candelatech.com>
>>
>> Have to free the skb before returning if we fail
>> the fib lookup.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>
> Applied, thanks.

Thanks.

This bug was introduced in 2.6.35, I believe, so should probably send
this to stable as well.

Thanks,
Ben

> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ipv6-multicast: Fix memory leak in input path.
  2011-09-27 19:34   ` Ben Greear
@ 2011-09-27 20:08     ` Eric Dumazet
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2011-09-27 20:08 UTC (permalink / raw)
  To: Ben Greear; +Cc: David Miller, netdev

Le mardi 27 septembre 2011 à 12:34 -0700, Ben Greear a écrit :
> On 09/27/2011 12:16 PM, David Miller wrote:
> > From: greearb@candelatech.com
> > Date: Tue, 27 Sep 2011 11:58:17 -0700
> >
> >> From: Ben Greear<greearb@candelatech.com>
> >>
> >> Have to free the skb before returning if we fail
> >> the fib lookup.
> >>
> >> Signed-off-by: Ben Greear<greearb@candelatech.com>
> >
> > Applied, thanks.
> 
> Thanks.
> 
> This bug was introduced in 2.6.35, I believe, so should probably send
> this to stable as well.
> 

A good way to handle this is to include in the changelog of the patch
the reference on faulty commit, to ease David and stable teams work.

Commit d1db275dd3f6
(ipv6: ip6mr: support multiple tables)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ipv6-multicast: Fix memory leak in input path.
  2011-09-27 19:16 ` David Miller
  2011-09-27 19:34   ` Ben Greear
@ 2012-02-02 17:26   ` Ben Greear
  2012-02-04 21:49     ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Ben Greear @ 2012-02-02 17:26 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On 09/27/2011 12:16 PM, David Miller wrote:
> From: greearb@candelatech.com
> Date: Tue, 27 Sep 2011 11:58:17 -0700
>
>> From: Ben Greear<greearb@candelatech.com>
>>
>> Have to free the skb before returning if we fail
>> the fib lookup.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>
> Applied, thanks.

 From what I can tell, this never made it into the 3.0 stable
series.

I know that normally you feed things to stable, but please let me
know if you'd like me to send it to the stable guys instead...

Thanks,
Ben


> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ipv6-multicast: Fix memory leak in input path.
  2012-02-02 17:26   ` Ben Greear
@ 2012-02-04 21:49     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-02-04 21:49 UTC (permalink / raw)
  To: greearb; +Cc: netdev

From: Ben Greear <greearb@candelatech.com>
Date: Thu, 02 Feb 2012 09:26:33 -0800

> On 09/27/2011 12:16 PM, David Miller wrote:
>> From: greearb@candelatech.com
>> Date: Tue, 27 Sep 2011 11:58:17 -0700
>>
>>> From: Ben Greear<greearb@candelatech.com>
>>>
>>> Have to free the skb before returning if we fail
>>> the fib lookup.
>>>
>>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>>
>> Applied, thanks.
> 
> From what I can tell, this never made it into the 3.0 stable
> series.
> 
> I know that normally you feed things to stable, but please let me
> know if you'd like me to send it to the stable guys instead...

I'll queue this and the other one up for -stable, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-04 21:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 18:58 [PATCH] ipv6-multicast: Fix memory leak in input path greearb
2011-09-27 19:16 ` David Miller
2011-09-27 19:34   ` Ben Greear
2011-09-27 20:08     ` Eric Dumazet
2012-02-02 17:26   ` Ben Greear
2012-02-04 21:49     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox