<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net, branch v3.14.23</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>rt2800: correct BBP1_TX_POWER_CTRL mask</title>
<updated>2014-10-30T16:38:23+00:00</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>sgruszka@redhat.com</email>
</author>
<published>2014-09-24T09:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c24580ec5132545788c48249f9d8fab758ee908c'/>
<id>c24580ec5132545788c48249f9d8fab758ee908c</id>
<content type='text'>
commit 01f7feeaf4528bec83798316b3c811701bac5d3e upstream.

Two bits control TX power on BBP_R1 register. Correct the mask,
otherwise we clear additional bit on BBP_R1 register, what can have
unknown, possible negative effect.

Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 01f7feeaf4528bec83798316b3c811701bac5d3e upstream.

Two bits control TX power on BBP_R1 register. Correct the mask,
otherwise we clear additional bit on BBP_R1 register, what can have
unknown, possible negative effect.

Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>iwlwifi: Add missing PCI IDs for the 7260 series</title>
<updated>2014-10-30T16:38:23+00:00</updated>
<author>
<name>Oren Givon</name>
<email>oren.givon@intel.com</email>
</author>
<published>2014-09-17T07:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=db2dccfee50de21a0d4c8ca7b215bf4d50a27335'/>
<id>db2dccfee50de21a0d4c8ca7b215bf4d50a27335</id>
<content type='text'>
commit 4f08970f5284dce486f0e2290834aefb2a262189 upstream.

Add 4 missing PCI IDs for the 7260 series.

Signed-off-by: Oren Givon &lt;oren.givon@intel.com&gt;
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4f08970f5284dce486f0e2290834aefb2a262189 upstream.

Add 4 missing PCI IDs for the 7260 series.

Signed-off-by: Oren Givon &lt;oren.givon@intel.com&gt;
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>team: avoid race condition in scheduling delayed work</title>
<updated>2014-10-15T06:36:42+00:00</updated>
<author>
<name>Joe Lawrence</name>
<email>Joe.Lawrence@stratus.com</email>
</author>
<published>2014-10-03T13:58:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5c4b226c22294a1746f386091da274016cbce394'/>
<id>5c4b226c22294a1746f386091da274016cbce394</id>
<content type='text'>
[ Upstream commit 47549650abd13d873fd2e5fc218db19e21031074 ]

When team_notify_peers and team_mcast_rejoin are called, they both reset
their respective .count_pending atomic variable. Then when the actual
worker function is executed, the variable is atomically decremented.
This pattern introduces a potential race condition where the
.count_pending rolls over and the worker function keeps rescheduling
until .count_pending decrements to zero again:

THREAD 1                           THREAD 2

========                           ========
team_notify_peers(teamX)
  atomic_set count_pending = 1
  schedule_delayed_work
                                   team_notify_peers(teamX)
                                   atomic_set count_pending = 1
team_notify_peers_work
  atomic_dec_and_test
    count_pending = 0
  (return)
                                   schedule_delayed_work
                                   team_notify_peers_work
                                   atomic_dec_and_test
                                     count_pending = -1
                                   schedule_delayed_work
                                   (repeat until count_pending = 0)

Instead of assigning a new value to .count_pending, use atomic_add to
tack-on the additional desired worker function invocations.

Signed-off-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
Acked-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Fixes: fc423ff00df3a19554414ee ("team: add peer notification")
Fixes: 492b200efdd20b8fcfdac87 ("team: add support for sending multicast rejoins")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 47549650abd13d873fd2e5fc218db19e21031074 ]

When team_notify_peers and team_mcast_rejoin are called, they both reset
their respective .count_pending atomic variable. Then when the actual
worker function is executed, the variable is atomically decremented.
This pattern introduces a potential race condition where the
.count_pending rolls over and the worker function keeps rescheduling
until .count_pending decrements to zero again:

THREAD 1                           THREAD 2

========                           ========
team_notify_peers(teamX)
  atomic_set count_pending = 1
  schedule_delayed_work
                                   team_notify_peers(teamX)
                                   atomic_set count_pending = 1
team_notify_peers_work
  atomic_dec_and_test
    count_pending = 0
  (return)
                                   schedule_delayed_work
                                   team_notify_peers_work
                                   atomic_dec_and_test
                                     count_pending = -1
                                   schedule_delayed_work
                                   (repeat until count_pending = 0)

Instead of assigning a new value to .count_pending, use atomic_add to
tack-on the additional desired worker function invocations.

Signed-off-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
Acked-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Fixes: fc423ff00df3a19554414ee ("team: add peer notification")
Fixes: 492b200efdd20b8fcfdac87 ("team: add support for sending multicast rejoins")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hyperv: Fix a bug in netvsc_start_xmit()</title>
<updated>2014-10-15T06:36:42+00:00</updated>
<author>
<name>KY Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2014-09-29T05:16:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=60fa7e97bfdd525fb879a4899dc2ed98ee658c76'/>
<id>60fa7e97bfdd525fb879a4899dc2ed98ee658c76</id>
<content type='text'>
[ Upstream commit dedb845ded56ded1c62f5398a94ffa8615d4592d ]

After the packet is successfully sent, we should not touch the skb
as it may have been freed. This patch is based on the work done by
Long Li &lt;longli@microsoft.com&gt;.

In this version of the patch I have fixed issues pointed out by David.
David, please queue this up for stable.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Tested-by: Long Li &lt;longli@microsoft.com&gt;
Tested-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit dedb845ded56ded1c62f5398a94ffa8615d4592d ]

After the packet is successfully sent, we should not touch the skb
as it may have been freed. This patch is based on the work done by
Long Li &lt;longli@microsoft.com&gt;.

In this version of the patch I have fixed issues pointed out by David.
David, please queue this up for stable.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Tested-by: Long Li &lt;longli@microsoft.com&gt;
Tested-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "net/macb: add pinctrl consumer support"</title>
<updated>2014-10-15T06:36:42+00:00</updated>
<author>
<name>Soren Brinkmann</name>
<email>soren.brinkmann@xilinx.com</email>
</author>
<published>2014-09-22T23:49:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e31689a696987eaea95c46f42e818000c880cbfb'/>
<id>e31689a696987eaea95c46f42e818000c880cbfb</id>
<content type='text'>
[ Upstream commit 9026968abe7ad102f4ac5c6d96d733643f75399c ]

This reverts commit 8ef29f8aae524bd51298fb10ac6a5ce6c4c5a3d8.
The driver core already calls pinctrl_get() and claims the default
state. There is no need to replicate this in the driver.
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;

Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 9026968abe7ad102f4ac5c6d96d733643f75399c ]

This reverts commit 8ef29f8aae524bd51298fb10ac6a5ce6c4c5a3d8.
The driver core already calls pinctrl_get() and claims the default
state. There is no need to replicate this in the driver.
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;

Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvtap: Fix race between device delete and open.</title>
<updated>2014-10-15T06:36:42+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2014-09-22T20:34:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e714dac8b95bd553a0d2d5709e4c200af5bc4184'/>
<id>e714dac8b95bd553a0d2d5709e4c200af5bc4184</id>
<content type='text'>
[ Upstream commit 40b8fe45d1f094e3babe7b2dc2b71557ab71401d ]

In macvtap device delete and open calls can race and
this causes a list curruption of the vlan queue_list.

The race intself is triggered by the idr accessors
that located the vlan device.  The device is stored
into and removed from the idr under both an rtnl and
a mutex.  However, when attempting to locate the device
in idr, only a mutex is taken.  As a result, once cpu
perfoming a delete may take an rtnl and wait for the mutex,
while another cput doing an open() will take the idr
mutex first to fetch the device pointer and later take
an rtnl to add a queue for the device which may have
just gotten deleted.

With this patch, we now hold the rtnl for the duration
of the macvtap_open() call thus making sure that
open will not race with delete.

CC: Michael S. Tsirkin &lt;mst@redhat.com&gt;
CC: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 40b8fe45d1f094e3babe7b2dc2b71557ab71401d ]

In macvtap device delete and open calls can race and
this causes a list curruption of the vlan queue_list.

The race intself is triggered by the idr accessors
that located the vlan device.  The device is stored
into and removed from the idr under both an rtnl and
a mutex.  However, when attempting to locate the device
in idr, only a mutex is taken.  As a result, once cpu
perfoming a delete may take an rtnl and wait for the mutex,
while another cput doing an open() will take the idr
mutex first to fetch the device pointer and later take
an rtnl to add a queue for the device which may have
just gotten deleted.

With this patch, we now hold the rtnl for the duration
of the macvtap_open() call thus making sure that
open will not race with delete.

CC: Michael S. Tsirkin &lt;mst@redhat.com&gt;
CC: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tg3: Allow for recieve of full-size 8021AD frames</title>
<updated>2014-10-15T06:36:42+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2014-09-30T23:39:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=152fc44a111f94a03e45c09c0ad200e6a93808dc'/>
<id>152fc44a111f94a03e45c09c0ad200e6a93808dc</id>
<content type='text'>
[ Upstream commit 7d3083ee36b51e425b6abd76778a2046906b0fd3 ]

When receiving a vlan-tagged frame that still contains
a vlan header, the length of the packet will be greater
then MTU+ETH_HLEN since it will account of the extra
vlan header.  TG3 checks this for the case for 802.1Q,
but not for 802.1ad.  As a result, full sized 802.1ad
frames get dropped by the card.

Add a check for 802.1ad protocol when receving full
sized frames.

Suggested-by: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
CC: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
CC: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 7d3083ee36b51e425b6abd76778a2046906b0fd3 ]

When receiving a vlan-tagged frame that still contains
a vlan header, the length of the packet will be greater
then MTU+ETH_HLEN since it will account of the extra
vlan header.  TG3 checks this for the case for 802.1Q,
but not for 802.1ad.  As a result, full sized 802.1ad
frames get dropped by the card.

Add a check for 802.1ad protocol when receving full
sized frames.

Suggested-by: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
CC: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
CC: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tg3: Work around HW/FW limitations with vlan encapsulated frames</title>
<updated>2014-10-15T06:36:41+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2014-09-18T14:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f28909e6d582c844dbfee9eeba28ec63748833ce'/>
<id>f28909e6d582c844dbfee9eeba28ec63748833ce</id>
<content type='text'>
[ Upstream commit 476c18850c6cbaa3f2bb661ae9710645081563b9 ]

TG3 appears to have an issue performing TSO and checksum offloading
correclty when the frame has been vlan encapsulated (non-accelrated).
In these cases, tcp checksum is not correctly updated.

This patch attempts to work around this issue.  After the patch,
802.1ad vlans start working correctly over tg3 devices.

CC: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
CC: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 476c18850c6cbaa3f2bb661ae9710645081563b9 ]

TG3 appears to have an issue performing TSO and checksum offloading
correclty when the frame has been vlan encapsulated (non-accelrated).
In these cases, tcp checksum is not correctly updated.

This patch attempts to work around this issue.  After the patch,
802.1ad vlans start working correctly over tg3 devices.

CC: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
CC: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: allow macvlans to move to net namespace</title>
<updated>2014-10-15T06:36:41+00:00</updated>
<author>
<name>Francesco Ruggeri</name>
<email>fruggeri@arista.com</email>
</author>
<published>2014-09-17T17:40:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=72c01e6fcc8025685fef4be3d060388dec4aaa2c'/>
<id>72c01e6fcc8025685fef4be3d060388dec4aaa2c</id>
<content type='text'>
[ Upstream commit 0d0162e7a33d3710b9604e7c68c0f31f5c457428 ]

I cannot move a macvlan interface created on top of a bonding interface
to a different namespace:

% ip netns add dummy0
% ip link add link bond0 mac0 type macvlan
% ip link set mac0 netns dummy0
RTNETLINK answers: Invalid argument
%

The problem seems to be that commit f9399814927a ("bonding: Don't allow
bond devices to change network namespaces.") sets NETIF_F_NETNS_LOCAL
on bonding interfaces, and commit 797f87f83b60 ("macvlan: fix netdev
feature propagation from lower device") causes macvlan interfaces
to inherit its features from the lower device.

NETIF_F_NETNS_LOCAL should not be inherited from the lower device
by a macvlan.
Patch tested on 3.16.

Signed-off-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Acked-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 0d0162e7a33d3710b9604e7c68c0f31f5c457428 ]

I cannot move a macvlan interface created on top of a bonding interface
to a different namespace:

% ip netns add dummy0
% ip link add link bond0 mac0 type macvlan
% ip link set mac0 netns dummy0
RTNETLINK answers: Invalid argument
%

The problem seems to be that commit f9399814927a ("bonding: Don't allow
bond devices to change network namespaces.") sets NETIF_F_NETNS_LOCAL
on bonding interfaces, and commit 797f87f83b60 ("macvlan: fix netdev
feature propagation from lower device") causes macvlan interfaces
to inherit its features from the lower device.

NETIF_F_NETNS_LOCAL should not be inherited from the lower device
by a macvlan.
Patch tested on 3.16.

Signed-off-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Acked-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: fix div by zero while enslaving and transmitting</title>
<updated>2014-10-15T06:36:41+00:00</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@redhat.com</email>
</author>
<published>2014-09-12T15:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9ede8fd5c6a7530d99ce93416f47e72872b052d2'/>
<id>9ede8fd5c6a7530d99ce93416f47e72872b052d2</id>
<content type='text'>
[ Upstream commit 9a72c2da690d78e93cff24b9f616412508678dd5 ]

The problem is that the slave is first linked and slave_cnt is
incremented afterwards leading to a div by zero in the modes that use it
as a modulus. What happens is that in bond_start_xmit()
bond_has_slaves() is used to evaluate further transmission and it becomes
true after the slave is linked in, but when slave_cnt is used in the xmit
path it is still 0, so fetch it once and transmit based on that. Since
it is used only in round-robin and XOR modes, the fix is only for them.
Thanks to Eric Dumazet for pointing out the fault in my first try to fix
this.

Call trace (took it out of net-next kernel, but it's the same with net):
[46934.330038] divide error: 0000 [#1] SMP
[46934.330041] Modules linked in: bonding(O) 9p fscache
snd_hda_codec_generic crct10dif_pclmul
[46934.330041] bond0: Enslaving eth1 as an active interface with an up
link
[46934.330051]  ppdev joydev crc32_pclmul crc32c_intel 9pnet_virtio
ghash_clmulni_intel snd_hda_intel 9pnet snd_hda_controller parport_pc
serio_raw pcspkr snd_hda_codec parport virtio_balloon virtio_console
snd_hwdep snd_pcm pvpanic i2c_piix4 snd_timer i2ccore snd soundcore
virtio_blk virtio_net virtio_pci virtio_ring virtio ata_generic
pata_acpi floppy [last unloaded: bonding]
[46934.330053] CPU: 1 PID: 3382 Comm: ping Tainted: G           O
3.17.0-rc4+ #27
[46934.330053] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[46934.330054] task: ffff88005aebf2c0 ti: ffff88005b728000 task.ti:
ffff88005b728000
[46934.330059] RIP: 0010:[&lt;ffffffffa0198c33&gt;]  [&lt;ffffffffa0198c33&gt;]
bond_start_xmit+0x1c3/0x450 [bonding]
[46934.330060] RSP: 0018:ffff88005b72b7f8  EFLAGS: 00010246
[46934.330060] RAX: 0000000000000679 RBX: ffff88004b077000 RCX:
000000000000002a
[46934.330061] RDX: 0000000000000000 RSI: ffff88004b3f0500 RDI:
ffff88004b077940
[46934.330061] RBP: ffff88005b72b830 R08: 00000000000000c0 R09:
ffff88004a83e000
[46934.330062] R10: 000000000000ffff R11: ffff88004b1f12c0 R12:
ffff88004b3f0500
[46934.330062] R13: ffff88004b3f0500 R14: 000000000000002a R15:
ffff88004b077940
[46934.330063] FS:  00007fbd91a4c740(0000) GS:ffff88005f080000(0000)
knlGS:0000000000000000
[46934.330064] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[46934.330064] CR2: 00007f803a8bb000 CR3: 000000004b2c9000 CR4:
00000000000406e0
[46934.330069] Stack:
[46934.330071]  ffffffff811e6169 00000000e772fa05 ffff88004b077000
ffff88004b3f0500
[46934.330072]  ffffffff81d17d18 000000000000002a 0000000000000000
ffff88005b72b8a0
[46934.330073]  ffffffff81620108 ffffffff8161fe0e ffff88005b72b8c4
ffff88005b302000
[46934.330073] Call Trace:
[46934.330077]  [&lt;ffffffff811e6169&gt;] ?
__kmalloc_node_track_caller+0x119/0x300
[46934.330084]  [&lt;ffffffff81620108&gt;] dev_hard_start_xmit+0x188/0x410
[46934.330086]  [&lt;ffffffff8161fe0e&gt;] ? harmonize_features+0x2e/0x90
[46934.330088]  [&lt;ffffffff81620b06&gt;] __dev_queue_xmit+0x456/0x590
[46934.330089]  [&lt;ffffffff81620c50&gt;] dev_queue_xmit+0x10/0x20
[46934.330090]  [&lt;ffffffff8168f022&gt;] arp_xmit+0x22/0x60
[46934.330091]  [&lt;ffffffff8168f090&gt;] arp_send.part.16+0x30/0x40
[46934.330092]  [&lt;ffffffff8168f1e5&gt;] arp_solicit+0x115/0x2b0
[46934.330094]  [&lt;ffffffff8160b5d7&gt;] ? copy_skb_header+0x17/0xa0
[46934.330096]  [&lt;ffffffff8162875a&gt;] neigh_probe+0x4a/0x70
[46934.330097]  [&lt;ffffffff8162979c&gt;] __neigh_event_send+0xac/0x230
[46934.330098]  [&lt;ffffffff8162a00b&gt;] neigh_resolve_output+0x13b/0x220
[46934.330100]  [&lt;ffffffff8165f120&gt;] ? ip_forward_options+0x1c0/0x1c0
[46934.330101]  [&lt;ffffffff81660478&gt;] ip_finish_output+0x1f8/0x860
[46934.330102]  [&lt;ffffffff81661f08&gt;] ip_output+0x58/0x90
[46934.330103]  [&lt;ffffffff81661602&gt;] ? __ip_local_out+0xa2/0xb0
[46934.330104]  [&lt;ffffffff81661640&gt;] ip_local_out_sk+0x30/0x40
[46934.330105]  [&lt;ffffffff81662a66&gt;] ip_send_skb+0x16/0x50
[46934.330106]  [&lt;ffffffff81662ad3&gt;] ip_push_pending_frames+0x33/0x40
[46934.330107]  [&lt;ffffffff8168854c&gt;] raw_sendmsg+0x88c/0xa30
[46934.330110]  [&lt;ffffffff81612b31&gt;] ? skb_recv_datagram+0x41/0x60
[46934.330111]  [&lt;ffffffff816875a9&gt;] ? raw_recvmsg+0xa9/0x1f0
[46934.330113]  [&lt;ffffffff816978d4&gt;] inet_sendmsg+0x74/0xc0
[46934.330114]  [&lt;ffffffff81697a9b&gt;] ? inet_recvmsg+0x8b/0xb0
[46934.330115] bond0: Adding slave eth2
[46934.330116]  [&lt;ffffffff8160357c&gt;] sock_sendmsg+0x9c/0xe0
[46934.330118]  [&lt;ffffffff81603248&gt;] ?
move_addr_to_kernel.part.20+0x28/0x80
[46934.330121]  [&lt;ffffffff811b4477&gt;] ? might_fault+0x47/0x50
[46934.330122]  [&lt;ffffffff816039b9&gt;] ___sys_sendmsg+0x3a9/0x3c0
[46934.330125]  [&lt;ffffffff8144a14a&gt;] ? n_tty_write+0x3aa/0x530
[46934.330127]  [&lt;ffffffff810d1ae4&gt;] ? __wake_up+0x44/0x50
[46934.330129]  [&lt;ffffffff81242b38&gt;] ? fsnotify+0x238/0x310
[46934.330130]  [&lt;ffffffff816048a1&gt;] __sys_sendmsg+0x51/0x90
[46934.330131]  [&lt;ffffffff816048f2&gt;] SyS_sendmsg+0x12/0x20
[46934.330134]  [&lt;ffffffff81738b29&gt;] system_call_fastpath+0x16/0x1b
[46934.330144] Code: 48 8b 10 4c 89 ee 4c 89 ff e8 aa bc ff ff 31 c0 e9
1a ff ff ff 0f 1f 00 4c 89 ee 4c 89 ff e8 65 fb ff ff 31 d2 4c 89 ee 4c
89 ff &lt;f7&gt; b3 64 09 00 00 e8 02 bd ff ff 31 c0 e9 f2 fe ff ff 0f 1f 00
[46934.330146] RIP  [&lt;ffffffffa0198c33&gt;] bond_start_xmit+0x1c3/0x450
[bonding]
[46934.330146]  RSP &lt;ffff88005b72b7f8&gt;

CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Fixes: 278b208375 ("bonding: initial RCU conversion")
Signed-off-by: Nikolay Aleksandrov &lt;nikolay@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 9a72c2da690d78e93cff24b9f616412508678dd5 ]

The problem is that the slave is first linked and slave_cnt is
incremented afterwards leading to a div by zero in the modes that use it
as a modulus. What happens is that in bond_start_xmit()
bond_has_slaves() is used to evaluate further transmission and it becomes
true after the slave is linked in, but when slave_cnt is used in the xmit
path it is still 0, so fetch it once and transmit based on that. Since
it is used only in round-robin and XOR modes, the fix is only for them.
Thanks to Eric Dumazet for pointing out the fault in my first try to fix
this.

Call trace (took it out of net-next kernel, but it's the same with net):
[46934.330038] divide error: 0000 [#1] SMP
[46934.330041] Modules linked in: bonding(O) 9p fscache
snd_hda_codec_generic crct10dif_pclmul
[46934.330041] bond0: Enslaving eth1 as an active interface with an up
link
[46934.330051]  ppdev joydev crc32_pclmul crc32c_intel 9pnet_virtio
ghash_clmulni_intel snd_hda_intel 9pnet snd_hda_controller parport_pc
serio_raw pcspkr snd_hda_codec parport virtio_balloon virtio_console
snd_hwdep snd_pcm pvpanic i2c_piix4 snd_timer i2ccore snd soundcore
virtio_blk virtio_net virtio_pci virtio_ring virtio ata_generic
pata_acpi floppy [last unloaded: bonding]
[46934.330053] CPU: 1 PID: 3382 Comm: ping Tainted: G           O
3.17.0-rc4+ #27
[46934.330053] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[46934.330054] task: ffff88005aebf2c0 ti: ffff88005b728000 task.ti:
ffff88005b728000
[46934.330059] RIP: 0010:[&lt;ffffffffa0198c33&gt;]  [&lt;ffffffffa0198c33&gt;]
bond_start_xmit+0x1c3/0x450 [bonding]
[46934.330060] RSP: 0018:ffff88005b72b7f8  EFLAGS: 00010246
[46934.330060] RAX: 0000000000000679 RBX: ffff88004b077000 RCX:
000000000000002a
[46934.330061] RDX: 0000000000000000 RSI: ffff88004b3f0500 RDI:
ffff88004b077940
[46934.330061] RBP: ffff88005b72b830 R08: 00000000000000c0 R09:
ffff88004a83e000
[46934.330062] R10: 000000000000ffff R11: ffff88004b1f12c0 R12:
ffff88004b3f0500
[46934.330062] R13: ffff88004b3f0500 R14: 000000000000002a R15:
ffff88004b077940
[46934.330063] FS:  00007fbd91a4c740(0000) GS:ffff88005f080000(0000)
knlGS:0000000000000000
[46934.330064] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[46934.330064] CR2: 00007f803a8bb000 CR3: 000000004b2c9000 CR4:
00000000000406e0
[46934.330069] Stack:
[46934.330071]  ffffffff811e6169 00000000e772fa05 ffff88004b077000
ffff88004b3f0500
[46934.330072]  ffffffff81d17d18 000000000000002a 0000000000000000
ffff88005b72b8a0
[46934.330073]  ffffffff81620108 ffffffff8161fe0e ffff88005b72b8c4
ffff88005b302000
[46934.330073] Call Trace:
[46934.330077]  [&lt;ffffffff811e6169&gt;] ?
__kmalloc_node_track_caller+0x119/0x300
[46934.330084]  [&lt;ffffffff81620108&gt;] dev_hard_start_xmit+0x188/0x410
[46934.330086]  [&lt;ffffffff8161fe0e&gt;] ? harmonize_features+0x2e/0x90
[46934.330088]  [&lt;ffffffff81620b06&gt;] __dev_queue_xmit+0x456/0x590
[46934.330089]  [&lt;ffffffff81620c50&gt;] dev_queue_xmit+0x10/0x20
[46934.330090]  [&lt;ffffffff8168f022&gt;] arp_xmit+0x22/0x60
[46934.330091]  [&lt;ffffffff8168f090&gt;] arp_send.part.16+0x30/0x40
[46934.330092]  [&lt;ffffffff8168f1e5&gt;] arp_solicit+0x115/0x2b0
[46934.330094]  [&lt;ffffffff8160b5d7&gt;] ? copy_skb_header+0x17/0xa0
[46934.330096]  [&lt;ffffffff8162875a&gt;] neigh_probe+0x4a/0x70
[46934.330097]  [&lt;ffffffff8162979c&gt;] __neigh_event_send+0xac/0x230
[46934.330098]  [&lt;ffffffff8162a00b&gt;] neigh_resolve_output+0x13b/0x220
[46934.330100]  [&lt;ffffffff8165f120&gt;] ? ip_forward_options+0x1c0/0x1c0
[46934.330101]  [&lt;ffffffff81660478&gt;] ip_finish_output+0x1f8/0x860
[46934.330102]  [&lt;ffffffff81661f08&gt;] ip_output+0x58/0x90
[46934.330103]  [&lt;ffffffff81661602&gt;] ? __ip_local_out+0xa2/0xb0
[46934.330104]  [&lt;ffffffff81661640&gt;] ip_local_out_sk+0x30/0x40
[46934.330105]  [&lt;ffffffff81662a66&gt;] ip_send_skb+0x16/0x50
[46934.330106]  [&lt;ffffffff81662ad3&gt;] ip_push_pending_frames+0x33/0x40
[46934.330107]  [&lt;ffffffff8168854c&gt;] raw_sendmsg+0x88c/0xa30
[46934.330110]  [&lt;ffffffff81612b31&gt;] ? skb_recv_datagram+0x41/0x60
[46934.330111]  [&lt;ffffffff816875a9&gt;] ? raw_recvmsg+0xa9/0x1f0
[46934.330113]  [&lt;ffffffff816978d4&gt;] inet_sendmsg+0x74/0xc0
[46934.330114]  [&lt;ffffffff81697a9b&gt;] ? inet_recvmsg+0x8b/0xb0
[46934.330115] bond0: Adding slave eth2
[46934.330116]  [&lt;ffffffff8160357c&gt;] sock_sendmsg+0x9c/0xe0
[46934.330118]  [&lt;ffffffff81603248&gt;] ?
move_addr_to_kernel.part.20+0x28/0x80
[46934.330121]  [&lt;ffffffff811b4477&gt;] ? might_fault+0x47/0x50
[46934.330122]  [&lt;ffffffff816039b9&gt;] ___sys_sendmsg+0x3a9/0x3c0
[46934.330125]  [&lt;ffffffff8144a14a&gt;] ? n_tty_write+0x3aa/0x530
[46934.330127]  [&lt;ffffffff810d1ae4&gt;] ? __wake_up+0x44/0x50
[46934.330129]  [&lt;ffffffff81242b38&gt;] ? fsnotify+0x238/0x310
[46934.330130]  [&lt;ffffffff816048a1&gt;] __sys_sendmsg+0x51/0x90
[46934.330131]  [&lt;ffffffff816048f2&gt;] SyS_sendmsg+0x12/0x20
[46934.330134]  [&lt;ffffffff81738b29&gt;] system_call_fastpath+0x16/0x1b
[46934.330144] Code: 48 8b 10 4c 89 ee 4c 89 ff e8 aa bc ff ff 31 c0 e9
1a ff ff ff 0f 1f 00 4c 89 ee 4c 89 ff e8 65 fb ff ff 31 d2 4c 89 ee 4c
89 ff &lt;f7&gt; b3 64 09 00 00 e8 02 bd ff ff 31 c0 e9 f2 fe ff ff 0f 1f 00
[46934.330146] RIP  [&lt;ffffffffa0198c33&gt;] bond_start_xmit+0x1c3/0x450
[bonding]
[46934.330146]  RSP &lt;ffff88005b72b7f8&gt;

CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Fixes: 278b208375 ("bonding: initial RCU conversion")
Signed-off-by: Nikolay Aleksandrov &lt;nikolay@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
