aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-06-12 15:02:47 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-14 02:28:56 -0400
commit9e71626c1c23ec69372c43c6fe66c1171032bf42 (patch)
tree664e2c6d342c210a6f041b97ed9a3d9c1bc58f06 /drivers/net/bonding/bond_sysfs.c
parent7e0838404541d2758bee089632690aabd82f3d5d (diff)
bonding: fix destructor
It is not safe to use a network device destructor that is a function in the module, since it can be called after module is unloaded if sysfs handle is open. When eventually using netlink, the device cleanup code needs to be done via uninit function. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 8041b6793532..72357597fa1b 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -127,7 +127,7 @@ static ssize_t bonding_store_bonds(struct class *cls, const char *buffer, size_t
127 printk(KERN_INFO DRV_NAME 127 printk(KERN_INFO DRV_NAME
128 ": %s is being deleted...\n", 128 ": %s is being deleted...\n",
129 bond->dev->name); 129 bond->dev->name);
130 bond_destroy(bond); 130 unregister_netdevice(bond->dev);
131 goto out_unlock; 131 goto out_unlock;
132 } 132 }
133 133