Re: [PATCH net v2 2/4] vxlan: Fix error path in __vxlan_dev_create()

2018-12-17 Thread Petr Machata
Roopa Prabhu writes: >> @@ -3297,9 +3298,15 @@ static int __vxlan_dev_create(struct net *net, struct >> net_device *dev, >> >> list_add(&vxlan->next, &vn->vxlan_list); >> return 0; >> + >> errout: >> + /* unregister_netdevice() destroys the default FDB entry with >> delet

Re: [PATCH net v2 2/4] vxlan: Fix error path in __vxlan_dev_create()

2018-12-17 Thread Roopa Prabhu
On Mon, Dec 17, 2018 at 10:10 AM Petr Machata wrote: > > When a failure occurs in rtnl_configure_link(), the current code > calls unregister_netdevice() to roll back the earlier call to > register_netdevice(), and jumps to errout, which calls > vxlan_fdb_destroy(). > > However unregister_netdevice

[PATCH net v2 2/4] vxlan: Fix error path in __vxlan_dev_create()

2018-12-17 Thread Petr Machata
When a failure occurs in rtnl_configure_link(), the current code calls unregister_netdevice() to roll back the earlier call to register_netdevice(), and jumps to errout, which calls vxlan_fdb_destroy(). However unregister_netdevice() calls transitively ndo_uninit, which is vxlan_uninit(), and that