[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <401753600.83187028.1473363165519.JavaMail.zimbra@redhat.com>
Date: Thu, 8 Sep 2016 15:32:45 -0400 (EDT)
From: Lance Richardson <lrichard@...hat.com>
To: Jojy Varghese <jojy.varghese@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH] net_namespace: fixed net_device reference leak
> From: "Jojy Varghese" <jojy.varghese@...il.com>
> To: netdev@...r.kernel.org
> Cc: davem@...emloft.net
> Sent: Thursday, September 8, 2016 3:08:29 PM
> Subject: Re: [PATCH] net_namespace: fixed net_device reference leak
>
> (Updating the patch for the case when a non-loopback dev could be
> unregistered)
>
> Currently during namespace cleanup, if ‘dst’ subsystem is holding
> a reference to the interface in the namespace, it does not get released.
> Current code first does a ’dev_hold’ on the same device followed by a
> ‘dev_put’ on the same device resulting in a no-op.
>
> This change fixes this leak by assigning the initial namespace’s loopback
> device to the ‘dst’ before releasing the reference to the network
> device being released.
>
> Additional reference: https://github.com/docker/docker/issues/5618
>
> Signed-off-by: Jojy G Varghese <jojy.varghese@...il.com>
> ---
If the dst wasn't being cleaned up in the namespace that's being deleted,
it is unlikely it will be cleaned up after moving it to the init namespace.
I think it would be better to figure out why this dst is being leaked
in the first place, otherwise this is probably still a memory leak.
Is this easily reproducible with current net or net-next kernels?
Regards,
Lance
Powered by blists - more mailing lists