Subject: Re: [PATCH net] vxlan: fix crash on module removal

From: Stephen Hemminger <[email-masked]>
Date: Wed, 5 Jun 2013 18:32:47 -0700

On Thu, 6 Jun 2013 01:11:11 +0000 (UTC)
Cong Wang <[email-masked]> wrote:

> On Wed, 05 Jun 2013 at 15:37 GMT, Stephen Hemminger <[email-masked]> wrote:
> > If vxlan is removed with active vxlan's it would crash because
> > rtnl_link_unregister (which calls vxlan_dellink), was invoked
> > before unregister_pernet_device (which calls vxlan_stop).
> >
> 
> Two points:
> 
> 1. There are still many others drivers calling them in such order...
> 2. The removal should be in a reverse order of creation, at least in
> theory.
> 
> I mean this *might* indicate something wrong.

1. Other drivers either don't have the dependency or are broken.
   It makes no sense to stop a device that is deleted.

2. The normal creation order is
   vxlan_setup
   vxlan_newlink
   vxlan_open