From: Libor Pechacek Date: Sat, 22 Mar 2008 05:29:35 +0000 (-0700) Subject: bonding: Fix sysfs attribute handling X-Git-Tag: v2.6.25-rc8~77^2~29 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92b41daa45a505268b11de9b7cbde2c13c0223b5;p=linux-2.6 bonding: Fix sysfs attribute handling 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 Acked-by: Jay Vosburgh Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 2056a872b4..0f0675319e 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -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