bonding: Fix sysfs attribute handling
authorLibor Pechacek <lpechacek@suse.cz>
Sat, 22 Mar 2008 05:29:35 +0000 (22:29 -0700)
committerJeff Garzik <jeff@garzik.org>
Wed, 26 Mar 2008 03:15:48 +0000 (23:15 -0400)
For bonding interfaces any attempt to read the sysfs directory contents after
module removal results in an oops.  The fix is to release sysfs attributes
for the interfaces upon module unload.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/bonding/bond_main.c

index 2056a872b4f385758cbda0b93515856abecead1a..0f0675319e9c601ff76880f001b4e07d5ad829ee 100644 (file)
@@ -4528,8 +4528,7 @@ static void bond_free_all(void)
                netif_tx_unlock_bh(bond_dev);
                /* Release the bonded slaves */
                bond_release_all(bond_dev);
-               bond_deinit(bond_dev);
-               unregister_netdevice(bond_dev);
+               bond_destroy(bond);
        }
 
 #ifdef CONFIG_PROC_FS