On Tue, Nov 24, 2015 at 8:09 AM, Nikolay Aleksandrov <[email protected]> wrote: > From: Nikolay Aleksandrov <[email protected]> > > Since (at least) commit b17a7c179dd3 ("[NET]: Do sysfs registration as > part of register_netdevice."), netdev_run_todo() deals only with > unregistration, so we don't need to do the rtnl_unlock/lock cycle to > finish registration when failing pimreg or dvmrp device creation. In > fact that opens a race condition where someone can delete the device > while rtnl is unlocked because it's fully registered. The problem gets > worse when netlink support is introduced as there are more points of entry > that can cause it and it also makes reusing that code correctly impossible. > > Signed-off-by: Nikolay Aleksandrov <[email protected]>
Makes sense for me, we do have some other cases (e.g. macvlan) where we call unregister_netdevice() in error path without re-taking RTNL lock. So, Reviewed-by: Cong Wang <[email protected]> Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
