more on the bonding driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have found a solution to another problem with the bonding driver.

If you ifconfig down an enslaved eth device, the bonding driver is not
notified and if there is an attempt to use the device then a crash
results.  I have added a one line fix to dev_close in net/core/dev.c

        /* if the device is a slave we should not touch it*/
        if(dev->flags&IFF_SLAVE)
                return -EBUSY;

I put it after the check to see if the interface is up.

This may not be the best solution but it prevents the kernel crashes and
as bond_release is not implemented there is not much point making the
device release it's self.

Since I made this change and the one in my last message I have not been
able to produce a crash.

(here is a script which will cause the crash on 2.2.16)
#!/bin/bash
insmod eepro100
insmod bonding
ifconfig bond0 192.168.1.2 up
ifenslave bond0 eth0
ifconfig eth0 down
ifconfig bond0 down
ifconfig bond0 192.168.1.2 up
ifconfig bond0 down


Again, if someone could confirm this fix it would be good.

John.

--
Information Technology Innovation Group
Swinburne University. Melbourne, Australia
http://uranus.it.swin.edu.au/~jn


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux