linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.9.y] Revert "net: sit: fix memory leak in sit_init_net()"
@ 2019-10-16  9:03 Ajay Kaher
  2019-10-16 18:30 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Ajay Kaher @ 2019-10-16  9:03 UTC (permalink / raw)
  To: gregkh
  Cc: davem, kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel,
	stable, srivatsab, srivatsa, amakhalov, srinidhir, bvikas,
	anishs, vsirnapalli, srostedt, akaher, Mao Wenan

This reverts commit 375d6d454a95ebacb9c6eb0b715da05a4458ffef which is
commit 07f12b26e21ab359261bf75cfcb424fdc7daeb6d upstream.

Unnecessarily calling free_netdev() from sit_init_net().
ipip6_dev_free() of 4.9.y called free_netdev(), so no need
to call again after ipip6_dev_free().

Cc: Mao Wenan <maowenan@huawei.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ajay Kaher <akaher@vmware.com>
---
 net/ipv6/sit.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 47ca2a2..16eba7b 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1856,7 +1856,6 @@ static int __net_init sit_init_net(struct net *net)
 
 err_reg_dev:
 	ipip6_dev_free(sitn->fb_tunnel_dev);
-	free_netdev(sitn->fb_tunnel_dev);
 err_alloc_dev:
 	return err;
 }
-- 
2.7.4


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

* Re: [PATCH 4.9.y] Revert "net: sit: fix memory leak in sit_init_net()"
  2019-10-16  9:03 [PATCH 4.9.y] Revert "net: sit: fix memory leak in sit_init_net()" Ajay Kaher
@ 2019-10-16 18:30 ` Greg KH
  2019-10-18  1:48   ` maowenan
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2019-10-16 18:30 UTC (permalink / raw)
  To: Ajay Kaher, Mao Wenan
  Cc: davem, kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel,
	stable, srivatsab, srivatsa, amakhalov, srinidhir, bvikas,
	anishs, vsirnapalli, srostedt, Mao Wenan

On Wed, Oct 16, 2019 at 02:33:54PM +0530, Ajay Kaher wrote:
> This reverts commit 375d6d454a95ebacb9c6eb0b715da05a4458ffef which is
> commit 07f12b26e21ab359261bf75cfcb424fdc7daeb6d upstream.
> 
> Unnecessarily calling free_netdev() from sit_init_net().
> ipip6_dev_free() of 4.9.y called free_netdev(), so no need
> to call again after ipip6_dev_free().
> 
> Cc: Mao Wenan <maowenan@huawei.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ajay Kaher <akaher@vmware.com>
> ---
>  net/ipv6/sit.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
> index 47ca2a2..16eba7b 100644
> --- a/net/ipv6/sit.c
> +++ b/net/ipv6/sit.c
> @@ -1856,7 +1856,6 @@ static int __net_init sit_init_net(struct net *net)
>  
>  err_reg_dev:
>  	ipip6_dev_free(sitn->fb_tunnel_dev);
> -	free_netdev(sitn->fb_tunnel_dev);
>  err_alloc_dev:
>  	return err;
>  }
> -- 
> 2.7.4
> 

Mao, are you ok with this change?

thanks,

greg k-h

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

* Re: [PATCH 4.9.y] Revert "net: sit: fix memory leak in sit_init_net()"
  2019-10-16 18:30 ` Greg KH
@ 2019-10-18  1:48   ` maowenan
  2019-10-27 20:05     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: maowenan @ 2019-10-18  1:48 UTC (permalink / raw)
  To: Greg KH, Ajay Kaher
  Cc: davem, kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel,
	stable, srivatsab, srivatsa, amakhalov, srinidhir, bvikas,
	anishs, vsirnapalli, srostedt



On 2019/10/17 2:30, Greg KH wrote:
> On Wed, Oct 16, 2019 at 02:33:54PM +0530, Ajay Kaher wrote:
>> This reverts commit 375d6d454a95ebacb9c6eb0b715da05a4458ffef which is
>> commit 07f12b26e21ab359261bf75cfcb424fdc7daeb6d upstream.
>>
>> Unnecessarily calling free_netdev() from sit_init_net().
>> ipip6_dev_free() of 4.9.y called free_netdev(), so no need
>> to call again after ipip6_dev_free().
>>
>> Cc: Mao Wenan <maowenan@huawei.com>
>> Cc: David S. Miller <davem@davemloft.net>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Ajay Kaher <akaher@vmware.com>
>> ---
>>  net/ipv6/sit.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
>> index 47ca2a2..16eba7b 100644
>> --- a/net/ipv6/sit.c
>> +++ b/net/ipv6/sit.c
>> @@ -1856,7 +1856,6 @@ static int __net_init sit_init_net(struct net *net)
>>  
>>  err_reg_dev:
>>  	ipip6_dev_free(sitn->fb_tunnel_dev);
>> -	free_netdev(sitn->fb_tunnel_dev);
>>  err_alloc_dev:
>>  	return err;
>>  }
>> -- 
>> 2.7.4
>>
> 
> Mao, are you ok with this change?
> 
> thanks,
> 
> greg k-h
> 

Greg, ipip6_dev_free has already called free_netdev in stable 4.9.

Reviewed-by: Mao Wenan <maowenan@huawei.com>

> .
> 


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

* Re: [PATCH 4.9.y] Revert "net: sit: fix memory leak in sit_init_net()"
  2019-10-18  1:48   ` maowenan
@ 2019-10-27 20:05     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-10-27 20:05 UTC (permalink / raw)
  To: maowenan
  Cc: Ajay Kaher, davem, kuznet, jmorris, yoshfuji, kaber, netdev,
	linux-kernel, stable, srivatsab, srivatsa, amakhalov, srinidhir,
	bvikas, anishs, vsirnapalli, srostedt

On Fri, Oct 18, 2019 at 09:48:05AM +0800, maowenan wrote:
> 
> 
> On 2019/10/17 2:30, Greg KH wrote:
> > On Wed, Oct 16, 2019 at 02:33:54PM +0530, Ajay Kaher wrote:
> >> This reverts commit 375d6d454a95ebacb9c6eb0b715da05a4458ffef which is
> >> commit 07f12b26e21ab359261bf75cfcb424fdc7daeb6d upstream.
> >>
> >> Unnecessarily calling free_netdev() from sit_init_net().
> >> ipip6_dev_free() of 4.9.y called free_netdev(), so no need
> >> to call again after ipip6_dev_free().
> >>
> >> Cc: Mao Wenan <maowenan@huawei.com>
> >> Cc: David S. Miller <davem@davemloft.net>
> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> Signed-off-by: Ajay Kaher <akaher@vmware.com>
> >> ---
> >>  net/ipv6/sit.c | 1 -
> >>  1 file changed, 1 deletion(-)
> >>
> >> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
> >> index 47ca2a2..16eba7b 100644
> >> --- a/net/ipv6/sit.c
> >> +++ b/net/ipv6/sit.c
> >> @@ -1856,7 +1856,6 @@ static int __net_init sit_init_net(struct net *net)
> >>  
> >>  err_reg_dev:
> >>  	ipip6_dev_free(sitn->fb_tunnel_dev);
> >> -	free_netdev(sitn->fb_tunnel_dev);
> >>  err_alloc_dev:
> >>  	return err;
> >>  }
> >> -- 
> >> 2.7.4
> >>
> > 
> > Mao, are you ok with this change?
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Greg, ipip6_dev_free has already called free_netdev in stable 4.9.
> 
> Reviewed-by: Mao Wenan <maowenan@huawei.com>

Thanks, now queued up.

greg k-h

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

end of thread, other threads:[~2019-10-27 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16  9:03 [PATCH 4.9.y] Revert "net: sit: fix memory leak in sit_init_net()" Ajay Kaher
2019-10-16 18:30 ` Greg KH
2019-10-18  1:48   ` maowenan
2019-10-27 20:05     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).