]> err.no Git - linux-2.6/blobdiff - drivers/net/bonding/bond_main.c
bonding: Deadlock between bonding_store_bonds and bond_destroy_sysfs.
[linux-2.6] / drivers / net / bonding / bond_main.c
index 5509732d3f9d3e4cdfb3232befef3f71fc491a6d..e41b3e57260c057a7269d63d8ea72d3700245541 100644 (file)
@@ -4992,9 +4992,10 @@ err:
                destroy_workqueue(bond->wq);
        }
 
+       bond_destroy_sysfs();
+
        rtnl_lock();
        bond_free_all();
-       bond_destroy_sysfs();
        rtnl_unlock();
 out:
        return res;
@@ -5006,9 +5007,10 @@ static void __exit bonding_exit(void)
        unregister_netdevice_notifier(&bond_netdev_notifier);
        unregister_inetaddr_notifier(&bond_inetaddr_notifier);
 
+       bond_destroy_sysfs();
+
        rtnl_lock();
        bond_free_all();
-       bond_destroy_sysfs();
        rtnl_unlock();
 }