diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index f8dedb623dc00c0b9c71e22c47ef3aa4cb58d6f7..90449a0f2a6c4454b277d6fa333264a014940794 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5039,6 +5039,14 @@ static int __init bonding_init(void) return 0; out_err: + /* + * rtnl_unlock() will run netdev_run_todo(), putting the + * thus-far-registered bonding devices into a state which + * unregigister_netdevice() will accept + */ + rtnl_unlock(); + rtnl_lock(); + /* free and unregister all bonds that were successfully added */ bond_free_all();