Bug 873226

Summary: attaching a dummy interface to bonding device causes a crash
Product: Red Hat Enterprise Linux 6 Reporter: sorin <sserban>
Component: kernelAssignee: Cong Wang <amwang>
Status: CLOSED ERRATA QA Contact: Liang Zheng <lzheng>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: giuseppe, kzhang, lzheng, mmilgram, myakove, nobody, rkhan, tgraf, tlavigne, zhchen
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.32-355.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 06:55:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sorin 2012-11-05 11:43:19 UTC
Description of problem:

enslaving a dummy interface to a bonding interface will cause a crash. This does not happen in older kernel versions (see bellow)

Version-Release number of selected component (if applicable):
rhel6.3, kernel 2.6.32-279.11.1.el6.x86_64, 
NOT 2.6.32-220.el6.x86_64

How reproducible:


Steps to Reproduce:

0.latest kernel in rhel6 (see above)

1.modprobe bonding
2.modprobe dummy
3.ifconfig bond0 up
4.ifenslave bond0 dummy0

<panic>

this is reproducible on a virtual machine without a problem


  
Actual results:

kernel panic

Expected results:

dummy0 is enslaved to bond0, no other effect.

Additional info:

Not including stack trace or vmcore, as it is so easy and reliable to reproduce. If something else needed, please ask.

Comment 3 Cong Wang 2012-11-09 05:16:50 UTC
A guess:

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 3b75d62..34a9db5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1750,7 +1750,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
        /*
         * Sync the slaves vlan state with the bonds vlan state
         */
-       if (slave_dev->ethtool_ops->get_flags &&
+       if (slave_dev->ethtool_ops && slave_dev->ethtool_ops->get_flags &&
            slave_dev->ethtool_ops->set_flags) {
                orig_flags = slave_dev->ethtool_ops->get_flags(slave_dev);      
                if (bond_dev->features & NETIF_F_LRO)

Comment 4 RHEL Program Management 2012-11-09 07:11:09 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 5 Thomas Graf 2012-11-09 09:24:02 UTC
Requesting exception due to regression

Comment 6 Thomas Graf 2012-11-09 13:07:14 UTC
*** Bug 874578 has been marked as a duplicate of this bug. ***

Comment 8 Jarod Wilson 2013-01-16 17:52:16 UTC
Patch(es)

Comment 11 Zhenjie Chen 2013-01-21 02:48:55 UTC
Tested on 2.6.32-355.el6.x86_64

[root@lenovo-thinkstation-01 ~]# uname -r
2.6.32-355.el6.x86_64
[root@lenovo-thinkstation-01 ~]# modprobe dummy
[root@lenovo-thinkstation-01 ~]# modprobe bonding
802.1Q VLAN Support v1.8 Ben Greear <greearb>
All bugs added by David S. Miller <davem>
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
[root@lenovo-thinkstation-01 ~]# ifconfig bond0 up
ADDRCONF(NETDEV_UP): bond0: link is not ready
8021q: adding VLAN 0 to HW filter on device bond0
[root@lenovo-thinkstation-01 ~]# ifenslave bond0 dummy0
New slave device dummy0 does not support netpoll
Disabling netpoll support for bond0
bonding: bond0: enslaving dummy0 as an active interface with an up link.
ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[root@lenovo-thinkstation-01 ~]# cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: dummy0
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 1e:7b:67:63:19:10
Slave queue ID: 0


Set VERIFIED

Comment 13 errata-xmlrpc 2013-02-21 06:55:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0496.html

Comment 14 Veaceslav Falico 2013-07-29 14:37:10 UTC
*** Bug 989505 has been marked as a duplicate of this bug. ***