[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Mar 2020 17:26:55 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Rafał Miłecki <zajec5@...il.com>
Cc: Network Development <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Felix Fietkau <nbd@....name>, John Crispin <john@...ozen.org>,
Jo-Philipp Wich <jo@...n.io>
Subject: Re: Regression: net/ipv6/mld running system out of memory (not a
leak)
On Tue, Mar 03, 2020 at 10:23:12AM +0100, Rafał Miłecki wrote:
> > Or maybe we just remove the list in addrconf_ifdown(), as opposite of
> > ipv6_add_dev(), which looks more clear.
> >
> > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> > index 164c71c54b5c..4369087b8b74 100644
> > --- a/net/ipv6/addrconf.c
> > +++ b/net/ipv6/addrconf.c
> > @@ -3841,6 +3841,12 @@ static int addrconf_ifdown(struct net_device *dev, int how)
> > ipv6_ac_destroy_dev(idev);
> > ipv6_mc_destroy_dev(idev);
> > } else {
> > + ipv6_dev_mc_dec(dev, &in6addr_interfacelocal_allnodes);
> > + ipv6_dev_mc_dec(dev, &in6addr_linklocal_allnodes);
> > +
> > + if (idev->cnf.forwarding && (dev->flags & IFF_MULTICAST))
> > + ipv6_dev_mc_dec(dev, &in6addr_linklocal_allrouters);
> > +
> > ipv6_mc_down(idev);
> > }
>
> FWIW I can confirm it fixes the problem for me!
>
> Only one ff02::2 entry is present when removing interface:
>
> [ 105.686503] [ipv6_mc_destroy_dev] idev->dev->name:mon-phy0
> [ 105.692056] [ipv6_mc_down] idev->dev->name:mon-phy0
> [ 105.696957] [ipv6_mc_destroy_dev -> __mld_clear_delrec] kfree(pmc:c64fd880) ff02::2
Cool, thanks for the quick test. I will post the fix then.
Thanks
Hangbin
Powered by blists - more mailing lists