<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/bonding, branch v3.0.79</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/bonding?h=v3.0.79</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/bonding?h=v3.0.79'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-01T15:56:37Z</updated>
<entry>
<title>bonding: IFF_BONDING is not stripped on enslave failure</title>
<updated>2013-05-01T15:56:37Z</updated>
<author>
<name>nikolay@redhat.com</name>
<email>nikolay@redhat.com</email>
</author>
<published>2013-04-11T09:18:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3c53e8d24e96e85acf028dc4ccb1e60a5486f47d'/>
<id>urn:sha1:3c53e8d24e96e85acf028dc4ccb1e60a5486f47d</id>
<content type='text'>
[ Upstream commit b6a5a7b9a528a8b4c8bec940b607c5dd9102b8cc ]

While enslaving a new device and after IFF_BONDING flag is set, in case
of failure it is not stripped from the device's priv_flags while
cleaning up, which could lead to other problems.
Cleaning at err_close because the flag is set after dev_open().

v2: no change

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>
</entry>
<entry>
<title>bonding: get netdev_rx_handler_unregister out of locks</title>
<updated>2013-04-05T17:16:54Z</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@redhat.com</email>
</author>
<published>2013-04-02T05:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f6cab49c7b11abf9595b1bf9b6ff73931c832e2e'/>
<id>urn:sha1:f6cab49c7b11abf9595b1bf9b6ff73931c832e2e</id>
<content type='text'>
[ Upstream commit fcd99434fb5c137274d2e15dd2a6a7455f0f29ff ]

Now that netdev_rx_handler_unregister contains synchronize_net(), we need
to call it outside of bond-&gt;lock, cause it might sleep. Also, remove the
already unneded synchronize_net().

Signed-off-by: Veaceslav Falico &lt;vfalico@redhat.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.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>
</entry>
<entry>
<title>bonding: fix race condition in bonding_store_slaves_active</title>
<updated>2013-01-11T17:03:35Z</updated>
<author>
<name>nikolay@redhat.com</name>
<email>nikolay@redhat.com</email>
</author>
<published>2012-11-29T01:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cefbc0583507deea5f6fd6232909761e0c3cc01a'/>
<id>urn:sha1:cefbc0583507deea5f6fd6232909761e0c3cc01a</id>
<content type='text'>
[ Upstream commit e196c0e579902f42cf72414461fb034e5a1ffbf7 ]

Race between bonding_store_slaves_active() and slave manipulation
 functions. The bond_for_each_slave use in bonding_store_slaves_active()
 is not protected by any synchronization mechanism.
 NULL pointer dereference is easy to reach.
 Fixed by acquiring the bond-&gt;lock for the slave walk.

 v2: Make description text &lt; 75 columns

Signed-off-by: Nikolay Aleksandrov &lt;nikolay@redhat.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.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>
</entry>
<entry>
<title>bonding: Bonding driver does not consider the gso_max_size/gso_max_segs setting of slave devices.</title>
<updated>2013-01-11T17:03:34Z</updated>
<author>
<name>Sarveshwar Bandi</name>
<email>sarveshwar.bandi@emulex.com</email>
</author>
<published>2012-11-21T04:35:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a8695e1c800bcf21dc9cf55044dd749a3f805427'/>
<id>urn:sha1:a8695e1c800bcf21dc9cf55044dd749a3f805427</id>
<content type='text'>
[ Upstream commit 0e376bd0b791ac6ac6bdb051492df0769c840848 ]

Patch sets the lowest gso_max_size and gso_max_segs values of the slave devices during enslave and detach.

Signed-off-by: Sarveshwar Bandi &lt;sarveshwar.bandi@emulex.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.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>
</entry>
<entry>
<title>bonding: Fix corrupted queue_mapping</title>
<updated>2012-07-16T15:47:37Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-12T06:03:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=76886430203577bfa3b437630058aa0346cb3168'/>
<id>urn:sha1:76886430203577bfa3b437630058aa0346cb3168</id>
<content type='text'>
[ Upstream commit 5ee31c6898ea5537fcea160999d60dc63bc0c305 ]

In the transmit path of the bonding driver, skb-&gt;cb is used to
stash the skb-&gt;queue_mapping so that the bonding device can set its
own queue mapping.  This value becomes corrupted since the skb-&gt;cb is
also used in __dev_xmit_skb.

When transmitting through bonding driver, bond_select_queue is
called from dev_queue_xmit.  In bond_select_queue the original
skb-&gt;queue_mapping is copied into skb-&gt;cb (via bond_queue_mapping)
and skb-&gt;queue_mapping is overwritten with the bond driver queue.

Subsequently in dev_queue_xmit, __dev_xmit_skb is called which writes
the packet length into skb-&gt;cb, thereby overwriting the stashed
queue mappping.  In bond_dev_queue_xmit (called from hard_start_xmit),
the queue mapping for the skb is set to the stashed value which is now
the skb length and hence is an invalid queue for the slave device.

If we want to save skb-&gt;queue_mapping into skb-&gt;cb[], best place is to
add a field in struct qdisc_skb_cb, to make sure it wont conflict with
other layers (eg : Qdiscc, Infiniband...)

This patchs also makes sure (struct qdisc_skb_cb)-&gt;data is aligned on 8
bytes :

netem qdisc for example assumes it can store an u64 in it, without
misalignment penalty.

Note : we only have 20 bytes left in (struct qdisc_skb_cb)-&gt;data[].
The largest user is CHOKe and it fills it.

Based on a previous patch from Tom Herbert.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Tom Herbert &lt;therbert@google.com&gt;
Cc: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.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>
</entry>
<entry>
<title>bonding: properly unset current_arp_slave on slave link up</title>
<updated>2012-04-27T16:51:19Z</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@redhat.com</email>
</author>
<published>2012-04-05T03:47:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53288841cc5e7cb81b5980a46462d8a357bc3387'/>
<id>urn:sha1:53288841cc5e7cb81b5980a46462d8a357bc3387</id>
<content type='text'>
[ Upstream commit 5a4309746cd74734daa964acb02690c22b3c8911 ]

When a slave comes up, we're unsetting the current_arp_slave without
removing active flags from it, which can lead to situations where we have
more than one slave with active flags in active-backup mode.

To avoid this situation we must remove the active flags from a slave before
removing it as a current_arp_slave.

Signed-off-by: Veaceslav Falico &lt;vfalico@redhat.com&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: Marcelo Ricardo Leitner &lt;mleitner@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>
</entry>
<entry>
<title>bonding: fix enslaving in alb mode when link down</title>
<updated>2012-02-03T17:19:03Z</updated>
<author>
<name>Jiri Bohac</name>
<email>jbohac@suse.cz</email>
</author>
<published>2012-01-18T12:24:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03024e3d2d6705443980f956abb56d4453319e95'/>
<id>urn:sha1:03024e3d2d6705443980f956abb56d4453319e95</id>
<content type='text'>
[ Upstream commit b924551bed09f61b64f21bffe241afc5526b091a ]

bond_alb_init_slave() is called from bond_enslave() and sets the slave's MAC
address. This is done differently for TLB and ALB modes.
bond-&gt;alb_info.rlb_enabled is used to discriminate between the two modes but
this flag may be uninitialized if the slave is being enslaved prior to calling
bond_open() -&gt; bond_alb_initialize() on the master.

It turns out all the callers of alb_set_slave_mac_addr() pass
bond-&gt;alb_info.rlb_enabled as the hw parameter.

This patch cleans up the unnecessary parameter of alb_set_slave_mac_addr() and
makes the function decide based on the bonding mode instead, which fixes the
above problem.

Reported-by: Narendra K &lt;Narendra_K@Dell.com&gt;
Signed-off-by: Jiri Bohac &lt;jbohac@suse.cz&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.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>
</entry>
<entry>
<title>bonding: fix error handling if slave is busy (v2)</title>
<updated>2012-01-12T19:35:44Z</updated>
<author>
<name>stephen hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2011-12-31T13:26:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=81aaa36dde03db855fb233382c7667f98ac12659'/>
<id>urn:sha1:81aaa36dde03db855fb233382c7667f98ac12659</id>
<content type='text'>
commit f7d9821a6a9c83450ac35e76d3709e32fd38b76f upstream.

If slave device already has a receive handler registered, then the
error unwind of bonding device enslave function is broken.

The following will leave a pointer to freed memory in the slave
device list, causing a later kernel panic.
# modprobe dummy
# ip li add dummy0-1 link dummy0 type macvlan
# modprobe bonding
# echo +dummy0 &gt;/sys/class/net/bond0/bonding/slaves

The fix is to detach the slave (which removes it from the list)
in the unwind path.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Reviewed-by: Nicolas de Pesloüan &lt;nicolas.2p.debian@free.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>bonding: use local function pointer of bond-&gt;recv_probe in bond_handle_frame</title>
<updated>2011-11-11T17:36:24Z</updated>
<author>
<name>Mitsuo Hayasaka</name>
<email>mitsuo.hayasaka.hu@hitachi.com</email>
</author>
<published>2011-10-12T16:04:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8c492bd9cbc8dd1002bf4bc316f21f0a002b10f'/>
<id>urn:sha1:e8c492bd9cbc8dd1002bf4bc316f21f0a002b10f</id>
<content type='text'>
[ Upstream commit 4d97480b1806e883eb1c7889d4e7a87e936e06d9 ]

The bond-&gt;recv_probe is called in bond_handle_frame() when
a packet is received, but bond_close() sets it to NULL. So,
a panic occurs when both functions work in parallel.

Why this happen:
After null pointer check of bond-&gt;recv_probe, an sk_buff is
duplicated and bond-&gt;recv_probe is called in bond_handle_frame.
So, a panic occurs when bond_close() is called between the
check and call of bond-&gt;recv_probe.

Patch:
This patch uses a local function pointer of bond-&gt;recv_probe
in bond_handle_frame(). So, it can avoid the null pointer
dereference.

Signed-off-by: Mitsuo Hayasaka &lt;mitsuo.hayasaka.hu@hitachi.com&gt;
Cc: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Cc: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>bonding: fix string comparison errors</title>
<updated>2011-08-16T01:31:38Z</updated>
<author>
<name>Andy Gospodarek</name>
<email>andy@greyhouse.net</email>
</author>
<published>2011-07-26T11:12:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=247460c92c3a5d58496c6d65c4b4604ca0e2ff0e'/>
<id>urn:sha1:247460c92c3a5d58496c6d65c4b4604ca0e2ff0e</id>
<content type='text'>
[ Upstream commit f4bb2e9c4fa9e5fdddf90589703613fd1a9c519f ]

When a bond contains a device where one name is the subset of another
(eth1 and eth10, for example), one cannot properly set the primary
device or the currently active device.

This was reported and based on work by Takuma Umeya.  I also verified
the problem and tested that this fix resolves it.

V2: A few did not like the the current code or my changes, so I
refactored bonding_store_primary and bonding_store_active_slave to be a
bit cleaner, dropped the use of strnicmp since we did not really need
the comparison to be case insensitive, and formatted the input string
from sysfs so a comparison to IFNAMSIZ could be used.

I also discovered an error in bonding_store_active_slave that would
modify bond-&gt;primary_slave rather than bond-&gt;curr_active_slave before
forcing the bonding driver to choose a new active slave.

V3: Actually sending the proper patch....

Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Reported-by: Takuma Umeya &lt;tumeya@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
