netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Pravin Shelar <pshelar@nicira.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH net 1/2] vxlan: unregister on namespace exit
Date: Thu, 18 Jul 2013 09:58:28 -0700	[thread overview]
Message-ID: <20130718095828.715cc9f4@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CALnjE+rStFY0nmTytAX7nLeg2O2kxP7WRSo-M3r_K59ELT1Y+A@mail.gmail.com>

On Thu, 18 Jul 2013 09:40:07 -0700
Pravin Shelar <pshelar@nicira.com> wrote:

> On Thu, Jul 18, 2013 at 8:38 AM, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> > Fix memory leaks and other badness from VXLAN network namespace
> > teardown. When network namespace is removed, all the vxlan devices should
> > be unregistered (not closed).
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> >
> > --- a/drivers/net/vxlan.c       2013-07-17 16:32:10.826955800 -0700
> > +++ b/drivers/net/vxlan.c       2013-07-17 16:47:35.275690741 -0700
> > @@ -1878,10 +1878,12 @@ static __net_exit void vxlan_exit_net(st
> >  {
> >         struct vxlan_net *vn = net_generic(net, vxlan_net_id);
> >         struct vxlan_dev *vxlan;
> > +       LIST_HEAD(list);
> >
> >         rtnl_lock();
> > -       list_for_each_entry(vxlan, &vn->vxlan_list, next)
> > -               dev_close(vxlan->dev);
> > +       list_for_each_entry(vxlan, &vn->vxlan_list, next)
> > +               unregister_netdevice_queue(vxlan->dev, &list);
> > +       unregister_netdevice_many(&list);
> >         rtnl_unlock();
> >  }
> >
> Looks good.
> Reviewed-by: Pravin B Shelar <pshelar@nicira.com>

vxlan might be a candidate for integration with the generic ip_tunnel
code, but haven't looked at all the details.

  reply	other threads:[~2013-07-18 16:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 15:38 [PATCH net 1/2] vxlan: unregister on namespace exit Stephen Hemminger
2013-07-18 15:40 ` [PATCH net 2/2] vxlan: fix igmp races Stephen Hemminger
2013-07-18 20:15   ` David Miller
2013-07-18 16:40 ` [PATCH net 1/2] vxlan: unregister on namespace exit Pravin Shelar
2013-07-18 16:58   ` Stephen Hemminger [this message]
2013-07-18 18:28     ` Pravin Shelar
2013-07-18 20:15 ` David Miller

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=20130718095828.715cc9f4@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.com \
    /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;
as well as URLs for NNTP newsgroup(s).