netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, dave.kleikamp@oracle.com,
	dan.carpenter@oracle.com
Subject: Re: [PATCH net-next] sunvnet: call unregister_netdev() exactly once per device
Date: Wed, 09 Jul 2014 07:27:26 -0400	[thread overview]
Message-ID: <53BD271E.6030901@oracle.com> (raw)
In-Reply-To: <20140708.204218.141082766724192890.davem@davemloft.net>

On 07/08/2014 11:42 PM, David Miller wrote:

>
> This is definitely not the right fix, you're just removing a symptom
> of a much larger problem.
>
> And that problem is that nothing cleans up the objects created by
> vnet_new(), they are completely leaked.

the bug(s) in modprobe -r is one manifestation of the problem
and should certainly be fixed, I can look into the suggestions
you have below.

But this is actually a bit worse. Whenever a node goes
away, it triggers a vio_port_remove() on all the peering nodes,
and blows away their networking. IOW this can happen without
involving vnet_exit() at all. Thus it might be necessary
for vio_port_remove() itself to check if its the last port
before doing the unregister?

BTW, for some odd reason I did not see my original patch submission
show up in the list. I'm not sure why.

>
> vnet_exit(), after doing the vio_unregister_driver(), should call a
> helper function that iterates over vnet_list and cleans up those
> objects.
>
> That's where the unregister_netdevice() belongs, not in vnet_port_remove().
> --
> 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
>

      reply	other threads:[~2014-07-09 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140708161827.GO19954@sowmini.varadhan@oracle.com>
2014-07-09  3:42 ` [PATCH net-next] sunvnet: call unregister_netdev() exactly once per device David Miller
2014-07-09 11:27   ` Sowmini Varadhan [this message]

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=53BD271E.6030901@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dave.kleikamp@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).