<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/bonding/bond_alb.c, branch v3.0-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>bonding: prevent deadlock on slave store with alb mode (v3)</title>
<updated>2011-05-25T21:55:33+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-05-25T08:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9fe0617d9b6d21f700ee9e658e1c9fe3be2fb402'/>
<id>9fe0617d9b6d21f700ee9e658e1c9fe3be2fb402</id>
<content type='text'>
This soft lockup was recently reported:

[root@dell-per715-01 ~]# echo +bond5 &gt; /sys/class/net/bonding_masters
[root@dell-per715-01 ~]# echo +eth1 &gt; /sys/class/net/bond5/bonding/slaves
bonding: bond5: doing slave updates when interface is down.
bonding bond5: master_dev is not up in bond_enslave
[root@dell-per715-01 ~]# echo -eth1 &gt; /sys/class/net/bond5/bonding/slaves
bonding: bond5: doing slave updates when interface is down.

BUG: soft lockup - CPU#12 stuck for 60s! [bash:6444]
CPU 12:
Modules linked in: bonding autofs4 hidp rfcomm l2cap bluetooth lockd sunrpc
be2d
Pid: 6444, comm: bash Not tainted 2.6.18-262.el5 #1
RIP: 0010:[&lt;ffffffff80064bf0&gt;]  [&lt;ffffffff80064bf0&gt;]
.text.lock.spinlock+0x26/00
RSP: 0018:ffff810113167da8  EFLAGS: 00000286
RAX: ffff810113167fd8 RBX: ffff810123a47800 RCX: 0000000000ff1025
RDX: 0000000000000000 RSI: ffff810123a47800 RDI: ffff81021b57f6f8
RBP: ffff81021b57f500 R08: 0000000000000000 R09: 000000000000000c
R10: 00000000ffffffff R11: ffff81011d41c000 R12: ffff81021b57f000
R13: 0000000000000000 R14: 0000000000000282 R15: 0000000000000282
FS:  00002b3b41ef3f50(0000) GS:ffff810123b27940(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00002b3b456dd000 CR3: 000000031fc60000 CR4: 00000000000006e0

Call Trace:
 [&lt;ffffffff80064af9&gt;] _spin_lock_bh+0x9/0x14
 [&lt;ffffffff886937d7&gt;] :bonding:tlb_clear_slave+0x22/0xa1
 [&lt;ffffffff8869423c&gt;] :bonding:bond_alb_deinit_slave+0xba/0xf0
 [&lt;ffffffff8868dda6&gt;] :bonding:bond_release+0x1b4/0x450
 [&lt;ffffffff8006457b&gt;] __down_write_nested+0x12/0x92
 [&lt;ffffffff88696ae4&gt;] :bonding:bonding_store_slaves+0x25c/0x2f7
 [&lt;ffffffff801106f7&gt;] sysfs_write_file+0xb9/0xe8
 [&lt;ffffffff80016b87&gt;] vfs_write+0xce/0x174
 [&lt;ffffffff80017450&gt;] sys_write+0x45/0x6e
 [&lt;ffffffff8005d28d&gt;] tracesys+0xd5/0xe0

It occurs because we are able to change the slave configuarion of a bond while
the bond interface is down.  The bonding driver initializes some data structures
only after its ndo_open routine is called.  Among them is the initalization of
the alb tx and rx hash locks.  So if we add or remove a slave without first
opening the bond master device, we run the risk of trying to lock/unlock a
spinlock that has garbage for data in it, which results in our above softlock.

Note that sometimes this works, because in many cases an unlocked spinlock has
the raw_lock parameter initialized to zero (meaning that the kzalloc of the
net_device private data is equivalent to calling spin_lock_init), but thats not
true in all cases, and we aren't guaranteed that condition, so we need to pass
the relevant spinlocks through the spin_lock_init function.

Fix it by moving the spin_lock_init calls for the tx and rx hashtable locks to
the ndo_init path, so they are ready for use by the bond_store_slaves path.

Change notes:
v2) Based on conversation with Jay and Nicolas it seems that the ability to
enslave devices while the bond master is down should be safe to do.  As such
this is an outlier bug, and so instead we'll just initalize the errant spinlocks
in the init path rather than the open path, solving the problem.  We'll also
remove the warnings about the bond being down during enslave operations, since
it should be safe

v3) Fix spelling error

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reported-by: jtluka@redhat.com
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: nicolas.2p.debian@gmail.com
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This soft lockup was recently reported:

[root@dell-per715-01 ~]# echo +bond5 &gt; /sys/class/net/bonding_masters
[root@dell-per715-01 ~]# echo +eth1 &gt; /sys/class/net/bond5/bonding/slaves
bonding: bond5: doing slave updates when interface is down.
bonding bond5: master_dev is not up in bond_enslave
[root@dell-per715-01 ~]# echo -eth1 &gt; /sys/class/net/bond5/bonding/slaves
bonding: bond5: doing slave updates when interface is down.

BUG: soft lockup - CPU#12 stuck for 60s! [bash:6444]
CPU 12:
Modules linked in: bonding autofs4 hidp rfcomm l2cap bluetooth lockd sunrpc
be2d
Pid: 6444, comm: bash Not tainted 2.6.18-262.el5 #1
RIP: 0010:[&lt;ffffffff80064bf0&gt;]  [&lt;ffffffff80064bf0&gt;]
.text.lock.spinlock+0x26/00
RSP: 0018:ffff810113167da8  EFLAGS: 00000286
RAX: ffff810113167fd8 RBX: ffff810123a47800 RCX: 0000000000ff1025
RDX: 0000000000000000 RSI: ffff810123a47800 RDI: ffff81021b57f6f8
RBP: ffff81021b57f500 R08: 0000000000000000 R09: 000000000000000c
R10: 00000000ffffffff R11: ffff81011d41c000 R12: ffff81021b57f000
R13: 0000000000000000 R14: 0000000000000282 R15: 0000000000000282
FS:  00002b3b41ef3f50(0000) GS:ffff810123b27940(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00002b3b456dd000 CR3: 000000031fc60000 CR4: 00000000000006e0

Call Trace:
 [&lt;ffffffff80064af9&gt;] _spin_lock_bh+0x9/0x14
 [&lt;ffffffff886937d7&gt;] :bonding:tlb_clear_slave+0x22/0xa1
 [&lt;ffffffff8869423c&gt;] :bonding:bond_alb_deinit_slave+0xba/0xf0
 [&lt;ffffffff8868dda6&gt;] :bonding:bond_release+0x1b4/0x450
 [&lt;ffffffff8006457b&gt;] __down_write_nested+0x12/0x92
 [&lt;ffffffff88696ae4&gt;] :bonding:bonding_store_slaves+0x25c/0x2f7
 [&lt;ffffffff801106f7&gt;] sysfs_write_file+0xb9/0xe8
 [&lt;ffffffff80016b87&gt;] vfs_write+0xce/0x174
 [&lt;ffffffff80017450&gt;] sys_write+0x45/0x6e
 [&lt;ffffffff8005d28d&gt;] tracesys+0xd5/0xe0

It occurs because we are able to change the slave configuarion of a bond while
the bond interface is down.  The bonding driver initializes some data structures
only after its ndo_open routine is called.  Among them is the initalization of
the alb tx and rx hash locks.  So if we add or remove a slave without first
opening the bond master device, we run the risk of trying to lock/unlock a
spinlock that has garbage for data in it, which results in our above softlock.

Note that sometimes this works, because in many cases an unlocked spinlock has
the raw_lock parameter initialized to zero (meaning that the kzalloc of the
net_device private data is equivalent to calling spin_lock_init), but thats not
true in all cases, and we aren't guaranteed that condition, so we need to pass
the relevant spinlocks through the spin_lock_init function.

Fix it by moving the spin_lock_init calls for the tx and rx hashtable locks to
the ndo_init path, so they are ready for use by the bond_store_slaves path.

Change notes:
v2) Based on conversation with Jay and Nicolas it seems that the ability to
enslave devices while the bond master is down should be safe to do.  As such
this is an outlier bug, and so instead we'll just initalize the errant spinlocks
in the init path rather than the open path, solving the problem.  We'll also
remove the warnings about the bond being down during enslave operations, since
it should be safe

v3) Fix spelling error

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reported-by: jtluka@redhat.com
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: nicolas.2p.debian@gmail.com
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: bonding: factor out rlock(bond-&gt;lock) in xmit path</title>
<updated>2011-05-09T19:05:59+00:00</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2011-05-07T01:48:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0693e88e6ccf615d9674548d8b924cdd9a1c976c'/>
<id>0693e88e6ccf615d9674548d8b924cdd9a1c976c</id>
<content type='text'>
Pull read_lock(&amp;bond-&gt;lock) and BOND_IS_OK() to bond_start_xmit() from
mode-dependent xmit functions.

netif_running() is always true in hard_start_xmit.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull read_lock(&amp;bond-&gt;lock) and BOND_IS_OK() to bond_start_xmit() from
mode-dependent xmit functions.

netif_running() is always true in hard_start_xmit.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: move processing of recv handlers into handle_frame()</title>
<updated>2011-04-25T19:00:30+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2011-04-19T03:48:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3aba891dde3842d89ad022237b99c1ed308040b0'/>
<id>3aba891dde3842d89ad022237b99c1ed308040b0</id>
<content type='text'>
Since now when bonding uses rx_handler, all traffic going into bond
device goes thru bond_handle_frame. So there's no need to go back into
bonding code later via ptype handlers. This patch converts
original ptype handlers into "bonding receive probes". These functions
are called from bond_handle_frame and they are registered per-mode.

Note that vlan packets are also handled because they are always untagged
thanks to vlan_untag()

Note that this also allows arpmon for eth-bond-bridge-vlan topology.

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since now when bonding uses rx_handler, all traffic going into bond
device goes thru bond_handle_frame. So there's no need to go back into
bonding code later via ptype handlers. This patch converts
original ptype handlers into "bonding receive probes". These functions
are called from bond_handle_frame and they are registered per-mode.

Note that vlan packets are also handled because they are always untagged
thanks to vlan_untag()

Note that this also allows arpmon for eth-bond-bridge-vlan topology.

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding:fix two typos</title>
<updated>2011-04-11T20:15:56+00:00</updated>
<author>
<name>Peter Pan(潘卫平)</name>
<email>panweiping3@gmail.com</email>
</author>
<published>2011-04-11T00:16:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=77c8e2c01542649f7a02fef8eb3b3d0e7fed6bbd'/>
<id>77c8e2c01542649f7a02fef8eb3b3d0e7fed6bbd</id>
<content type='text'>
replace relpy with reply.
replace premanent with permanent.

Signed-off-by: Weiping Pan(潘卫平) &lt;panweiping3@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
replace relpy with reply.
replace premanent with permanent.

Signed-off-by: Weiping Pan(潘卫平) &lt;panweiping3@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding:set save_load to 0 when initializing</title>
<updated>2011-04-11T20:15:54+00:00</updated>
<author>
<name>Peter Pan(潘卫平)</name>
<email>panweiping3@gmail.com</email>
</author>
<published>2011-04-08T03:40:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=38dbaf0afb518e462de7afca552acad048237a73'/>
<id>38dbaf0afb518e462de7afca552acad048237a73</id>
<content type='text'>
It is unnecessary to set save_load to 1 here,
as the tx_hashtbl is just kzalloced.

Signed-off-by: Weiping Pan(潘卫平) &lt;panweiping3@gmail.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is unnecessary to set save_load to 1 here,
as the tx_hashtbl is just kzalloced.

Signed-off-by: Weiping Pan(潘卫平) &lt;panweiping3@gmail.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: use the correct size for _simple_hash()</title>
<updated>2011-02-28T21:21:28+00:00</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-02-27T23:34:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e364a3416d81c7717dd642dc9b3ab132b7885f66'/>
<id>e364a3416d81c7717dd642dc9b3ab132b7885f66</id>
<content type='text'>
Clearly it should be the size of -&gt;ip_dst here.
Although this is harmless, but it still reads odd.

Signed-off-by: WANG Cong &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clearly it should be the size of -&gt;ip_dst here.
Although this is harmless, but it still reads odd.

Signed-off-by: WANG Cong &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: Ensure that we unshare skbs prior to calling pskb_may_pull</title>
<updated>2011-01-21T00:45:56+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-01-20T09:02:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b30532515f0a62bfe17207ab00883dd262497006'/>
<id>b30532515f0a62bfe17207ab00883dd262497006</id>
<content type='text'>
Recently reported oops:

kernel BUG at net/core/skbuff.c:813!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/net/bond0/broadcast
CPU 8
Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]

Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]
Pid: 0, comm: swapper Not tainted 2.6.32-71.el6.x86_64 #1 BladeCenter HS22
-[7870AC1]-
RIP: 0010:[&lt;ffffffff81405b16&gt;]  [&lt;ffffffff81405b16&gt;]
pskb_expand_head+0x36/0x1e0
RSP: 0018:ffff880028303b70  EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff880c6458ec80 RCX: 0000000000000020
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880c6458ec80
RBP: ffff880028303bc0 R08: ffffffff818a6180 R09: ffff880c6458ed64
R10: ffff880c622b36c0 R11: 0000000000000400 R12: 0000000000000000
R13: 0000000000000180 R14: ffff880c622b3000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff880028300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000038653452a4 CR3: 0000000001001000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff8806649c2000, task ffff880c64f16ab0)
Stack:
 ffff880028303bc0 ffffffff8104fff9 000000000000001c 0000000100000000
&lt;0&gt; ffff880000047d80 ffff880c6458ec80 000000000000001c ffff880c6223da00
&lt;0&gt; ffff880c622b3000 0000000000000000 ffff880028303c10 ffffffff81407f7a
Call Trace:
&lt;IRQ&gt;
 [&lt;ffffffff8104fff9&gt;] ? __wake_up_common+0x59/0x90
 [&lt;ffffffff81407f7a&gt;] __pskb_pull_tail+0x2aa/0x360
 [&lt;ffffffffa0244530&gt;] bond_arp_rcv+0x2c0/0x2e0 [bonding]
 [&lt;ffffffff814a0857&gt;] ? packet_rcv+0x377/0x440
 [&lt;ffffffff8140f21b&gt;] netif_receive_skb+0x2db/0x670
 [&lt;ffffffff8140f788&gt;] napi_skb_finish+0x58/0x70
 [&lt;ffffffff8140fc89&gt;] napi_gro_receive+0x39/0x50
 [&lt;ffffffffa01286eb&gt;] ixgbe_clean_rx_irq+0x35b/0x900 [ixgbe]
 [&lt;ffffffffa01290f6&gt;] ixgbe_clean_rxtx_many+0x136/0x240 [ixgbe]
 [&lt;ffffffff8140fe53&gt;] net_rx_action+0x103/0x210
 [&lt;ffffffff81073bd7&gt;] __do_softirq+0xb7/0x1e0
 [&lt;ffffffff810d8740&gt;] ? handle_IRQ_event+0x60/0x170
 [&lt;ffffffff810142cc&gt;] call_softirq+0x1c/0x30
 [&lt;ffffffff81015f35&gt;] do_softirq+0x65/0xa0
 [&lt;ffffffff810739d5&gt;] irq_exit+0x85/0x90
 [&lt;ffffffff814cf915&gt;] do_IRQ+0x75/0xf0
 [&lt;ffffffff81013ad3&gt;] ret_from_intr+0x0/0x11
 &lt;EOI&gt;
 [&lt;ffffffff8101bc01&gt;] ? mwait_idle+0x71/0xd0
 [&lt;ffffffff814cd80a&gt;] ? atomic_notifier_call_chain+0x1a/0x20
 [&lt;ffffffff81011e96&gt;] cpu_idle+0xb6/0x110
 [&lt;ffffffff814c17c8&gt;] start_secondary+0x1fc/0x23f

Resulted from bonding driver registering packet handlers via dev_add_pack and
then trying to call pskb_may_pull. If another packet handler (like for AF_PACKET
sockets) gets called first, the delivered skb will have a user count &gt; 1, which
causes pskb_may_pull to BUG halt when it does its skb_shared check.  Fix this by
calling skb_share_check prior to the may_pull call sites in the bonding driver
to clone the skb when needed.  Tested by myself and the reported successfully.

Signed-off-by: Neil Horman
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently reported oops:

kernel BUG at net/core/skbuff.c:813!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/net/bond0/broadcast
CPU 8
Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]

Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]
Pid: 0, comm: swapper Not tainted 2.6.32-71.el6.x86_64 #1 BladeCenter HS22
-[7870AC1]-
RIP: 0010:[&lt;ffffffff81405b16&gt;]  [&lt;ffffffff81405b16&gt;]
pskb_expand_head+0x36/0x1e0
RSP: 0018:ffff880028303b70  EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff880c6458ec80 RCX: 0000000000000020
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880c6458ec80
RBP: ffff880028303bc0 R08: ffffffff818a6180 R09: ffff880c6458ed64
R10: ffff880c622b36c0 R11: 0000000000000400 R12: 0000000000000000
R13: 0000000000000180 R14: ffff880c622b3000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff880028300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000038653452a4 CR3: 0000000001001000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff8806649c2000, task ffff880c64f16ab0)
Stack:
 ffff880028303bc0 ffffffff8104fff9 000000000000001c 0000000100000000
&lt;0&gt; ffff880000047d80 ffff880c6458ec80 000000000000001c ffff880c6223da00
&lt;0&gt; ffff880c622b3000 0000000000000000 ffff880028303c10 ffffffff81407f7a
Call Trace:
&lt;IRQ&gt;
 [&lt;ffffffff8104fff9&gt;] ? __wake_up_common+0x59/0x90
 [&lt;ffffffff81407f7a&gt;] __pskb_pull_tail+0x2aa/0x360
 [&lt;ffffffffa0244530&gt;] bond_arp_rcv+0x2c0/0x2e0 [bonding]
 [&lt;ffffffff814a0857&gt;] ? packet_rcv+0x377/0x440
 [&lt;ffffffff8140f21b&gt;] netif_receive_skb+0x2db/0x670
 [&lt;ffffffff8140f788&gt;] napi_skb_finish+0x58/0x70
 [&lt;ffffffff8140fc89&gt;] napi_gro_receive+0x39/0x50
 [&lt;ffffffffa01286eb&gt;] ixgbe_clean_rx_irq+0x35b/0x900 [ixgbe]
 [&lt;ffffffffa01290f6&gt;] ixgbe_clean_rxtx_many+0x136/0x240 [ixgbe]
 [&lt;ffffffff8140fe53&gt;] net_rx_action+0x103/0x210
 [&lt;ffffffff81073bd7&gt;] __do_softirq+0xb7/0x1e0
 [&lt;ffffffff810d8740&gt;] ? handle_IRQ_event+0x60/0x170
 [&lt;ffffffff810142cc&gt;] call_softirq+0x1c/0x30
 [&lt;ffffffff81015f35&gt;] do_softirq+0x65/0xa0
 [&lt;ffffffff810739d5&gt;] irq_exit+0x85/0x90
 [&lt;ffffffff814cf915&gt;] do_IRQ+0x75/0xf0
 [&lt;ffffffff81013ad3&gt;] ret_from_intr+0x0/0x11
 &lt;EOI&gt;
 [&lt;ffffffff8101bc01&gt;] ? mwait_idle+0x71/0xd0
 [&lt;ffffffff814cd80a&gt;] ? atomic_notifier_call_chain+0x1a/0x20
 [&lt;ffffffff81011e96&gt;] cpu_idle+0xb6/0x110
 [&lt;ffffffff814c17c8&gt;] start_secondary+0x1fc/0x23f

Resulted from bonding driver registering packet handlers via dev_add_pack and
then trying to call pskb_may_pull. If another packet handler (like for AF_PACKET
sockets) gets called first, the delivered skb will have a user count &gt; 1, which
causes pskb_may_pull to BUG halt when it does its skb_shared check.  Fix this by
calling skb_share_check prior to the may_pull call sites in the bonding driver
to clone the skb when needed.  Tested by myself and the reported successfully.

Signed-off-by: Neil Horman
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: migrate some macros from bond_alb.c to bond_alb.h</title>
<updated>2010-12-16T21:16:05+00:00</updated>
<author>
<name>Taku Izumi</name>
<email>izumi.taku@jp.fujitsu.com</email>
</author>
<published>2010-12-12T19:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=411204a5a1ec1a35363d8ef450c77e2b8235da4d'/>
<id>411204a5a1ec1a35363d8ef450c77e2b8235da4d</id>
<content type='text'>
This patch simply migrates some macros from bond_alb.c to bond_alb.h.

Signed-off-by: Taku Izumi &lt;izumi.taku@jp.fujitsu.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch simply migrates some macros from bond_alb.c to bond_alb.h.

Signed-off-by: Taku Izumi &lt;izumi.taku@jp.fujitsu.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: correctly process non-linear skbs</title>
<updated>2010-09-14T21:25:32+00:00</updated>
<author>
<name>Andy Gospodarek</name>
<email>andy@greyhouse.net</email>
</author>
<published>2010-09-10T11:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ab12811c89e88f2e66746790b1fe4469ccb7bdd9'/>
<id>ab12811c89e88f2e66746790b1fe4469ccb7bdd9</id>
<content type='text'>
It was recently brought to my attention that 802.3ad mode bonds would no
longer form when using some network hardware after a driver update.
After snooping around I realized that the particular hardware was using
page-based skbs and found that skb-&gt;data did not contain a valid LACPDU
as it was not stored there.  That explained the inability to form an
802.3ad-based bond.  For balance-alb mode bonds this was also an issue
as ARPs would not be properly processed.

This patch fixes the issue in my tests and should be applied to 2.6.36
and as far back as anyone cares to add it to stable.

Thanks to Alexander Duyck &lt;alexander.h.duyck@intel.com&gt; and Jesse
Brandeburg &lt;jesse.brandeburg@intel.com&gt; for the suggestions on this one.

Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
CC: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
CC: stable@kerne.org
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was recently brought to my attention that 802.3ad mode bonds would no
longer form when using some network hardware after a driver update.
After snooping around I realized that the particular hardware was using
page-based skbs and found that skb-&gt;data did not contain a valid LACPDU
as it was not stored there.  That explained the inability to form an
802.3ad-based bond.  For balance-alb mode bonds this was also an issue
as ARPs would not be properly processed.

This patch fixes the issue in my tests and should be applied to 2.6.36
and as far back as anyone cares to add it to stable.

Thanks to Alexander Duyck &lt;alexander.h.duyck@intel.com&gt; and Jesse
Brandeburg &lt;jesse.brandeburg@intel.com&gt; for the suggestions on this one.

Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
CC: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
CC: stable@kerne.org
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-07-28T04:01:35+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-07-28T04:01:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bb7e95c8fd859922c6cf3ebbb3a8546007df1748'/>
<id>bb7e95c8fd859922c6cf3ebbb3a8546007df1748</id>
<content type='text'>
Conflicts:
	drivers/net/bnx2x_main.c

Merge bnx2x bug fixes in by hand... :-/

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/bnx2x_main.c

Merge bnx2x bug fixes in by hand... :-/

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
