summaryrefslogtreecommitdiff
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorMoni Shoua <monis@voltaire.com>2008-07-02 18:21:59 -0700
committerJeff Garzik <jgarzik@redhat.com>2008-08-07 03:59:56 -0400
commitdb018a5f49e1768891221a580e59f6825c52ab7a (patch)
tree6cef0e9f28da25cf71e044dc12c97a381752a447 /drivers/net/bonding
parentf0c76d61779b153dbfb955db3f144c62d02173c2 (diff)
bonding: Don't destroy bonding master when removing slave via sysfs
It is wrong to destroy a bonding master from a context that uses the sysfs of that bond. When last IPoIB slave is unenslaved from by writing to a sysfs file (for bond0 this would be /sys/class/net/bond0/bonding/slaves) the driver tries to destroy the bond. This is wrong and can lead to a lockup or a crash. This fix lets the bonding master stay and relies on the user to destroy the bonding master if necessary (i.e. before module ib_ipoib is unloaded) This patch affects only bonds of IPoIB slaves. Ethernet slaves stay unaffected. Signed-off-by: Moni Shoua <monis@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_sysfs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 6caac0ffb2f2..3bdb47382521 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -350,9 +350,6 @@ static ssize_t bonding_store_slaves(struct device *d,
if (dev) {
printk(KERN_INFO DRV_NAME ": %s: Removing slave %s\n",
bond->dev->name, dev->name);
- if (bond->setup_by_slave)
- res = bond_release_and_destroy(bond->dev, dev);
- else
res = bond_release(bond->dev, dev);
if (res) {
ret = res;