netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch for 2.6.25? 1/1] bonding: fix sysfs attribute handling
@ 2008-03-27  7:47 akpm
  2008-03-27 12:22 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-03-27  7:47 UTC (permalink / raw)
  To: jeff; +Cc: davem, netdev, akpm, lpechacek, fubar, stable

From: Libor Pechacek <lpechacek@suse.cz>

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>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/bonding/bond_main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/net/bonding/bond_main.c~bonding-fix-sysfs-attribute-handling drivers/net/bonding/bond_main.c
--- a/drivers/net/bonding/bond_main.c~bonding-fix-sysfs-attribute-handling
+++ a/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
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-27 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-27  7:47 [patch for 2.6.25? 1/1] bonding: fix sysfs attribute handling akpm
2008-03-27 12:22 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).