<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/bonding/bond_sysfs.c, branch v3.4.2</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>Merge branch 'driver-core-next' into Linux 3.2</title>
<updated>2012-01-06T19:42:52+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2012-01-06T19:42:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df'/>
<id>ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df</id>
<content type='text'>
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.

The microcode_core.c patch was provided by Stephen Rothwell
&lt;sfr@canb.auug.org.au&gt; who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.

The microcode_core.c patch was provided by Stephen Rothwell
&lt;sfr@canb.auug.org.au&gt; who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>driver-core: remove sysdev.h usage.</title>
<updated>2011-12-22T00:26:03+00:00</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2011-12-22T00:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=edbaa603eb801655e80808a9cf3d3b622e8ac66b'/>
<id>edbaa603eb801655e80808a9cf3d3b622e8ac66b</id>
<content type='text'>
The sysdev.h file should not be needed by any in-kernel code, so remove
the .h file from these random files that seem to still want to include
it.

The sysdev code will be going away soon, so this include needs to be
removed no matter what.

Cc: Jiandong Zheng &lt;jdzheng@broadcom.com&gt;
Cc: Scott Branden &lt;sbranden@broadcom.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Kukjin Kim &lt;kgene.kim@samsung.com&gt;
Cc: David Brown &lt;davidb@codeaurora.org&gt;
Cc: Daniel Walker &lt;dwalker@fifo99.com&gt;
Cc: Bryan Huntsman &lt;bryanh@codeaurora.org&gt;
Cc: Ben Dooks &lt;ben-linux@fluff.org&gt;
Cc: Wan ZongShun &lt;mcuos.com@gmail.com&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@gmail.com&gt;
Cc: Hans-Christian Egtvedt &lt;egtvedt@samfundet.no&gt;
Cc: Guan Xuetao &lt;gxt@mprc.pku.edu.cn&gt;
Cc: "Venkatesh Pallipadi
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sysdev.h file should not be needed by any in-kernel code, so remove
the .h file from these random files that seem to still want to include
it.

The sysdev code will be going away soon, so this include needs to be
removed no matter what.

Cc: Jiandong Zheng &lt;jdzheng@broadcom.com&gt;
Cc: Scott Branden &lt;sbranden@broadcom.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Kukjin Kim &lt;kgene.kim@samsung.com&gt;
Cc: David Brown &lt;davidb@codeaurora.org&gt;
Cc: Daniel Walker &lt;dwalker@fifo99.com&gt;
Cc: Bryan Huntsman &lt;bryanh@codeaurora.org&gt;
Cc: Ben Dooks &lt;ben-linux@fluff.org&gt;
Cc: Wan ZongShun &lt;mcuos.com@gmail.com&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@gmail.com&gt;
Cc: Hans-Christian Egtvedt &lt;egtvedt@samfundet.no&gt;
Cc: Guan Xuetao &lt;gxt@mprc.pku.edu.cn&gt;
Cc: "Venkatesh Pallipadi
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: Don't allow mode change via sysfs with slaves present</title>
<updated>2011-11-18T00:31:54+00:00</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@redhat.com</email>
</author>
<published>2011-11-15T06:44:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a8bb7e27fbb68da888b55f26defd2855225b2d5'/>
<id>4a8bb7e27fbb68da888b55f26defd2855225b2d5</id>
<content type='text'>
When changing mode via bonding's sysfs, the slaves are not initialized
correctly. Forbid to change modes with slaves present to ensure that every
slave is initialized correctly via bond_enslave().

Signed-off-by: Veaceslav Falico &lt;vfalico@redhat.com&gt;
Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Acked-by: Nicolas de Pesloüan &lt;nicolas.2p.debian@free.fr&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>
When changing mode via bonding's sysfs, the slaves are not initialized
correctly. Forbid to change modes with slaves present to ensure that every
slave is initialized correctly via bond_enslave().

Signed-off-by: Veaceslav Falico &lt;vfalico@redhat.com&gt;
Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Acked-by: Nicolas de Pesloüan &lt;nicolas.2p.debian@free.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: Add a forgetten sysfs_attr_init on class_attr_bonding_masters</title>
<updated>2011-10-22T09:08:44+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-10-21T22:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01718e36df750670d0f840932a4d166522ead6c3'/>
<id>01718e36df750670d0f840932a4d166522ead6c3</id>
<content type='text'>
When I made class_attr_bonding_matters per network namespace and dynamically
allocated I overlooked the need for calling sysfs_attr_init.  Oops.

This fixes the following lockdep splat:

[    5.749651] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[    5.749655] bonding: MII link monitoring set to 100 ms
[    5.749676] BUG: key f49a831c not in .data!
[    5.749677] ------------[ cut here ]------------
[    5.749752] WARNING: at kernel/lockdep.c:2897 lockdep_init_map+0x1c3/0x460()
[    5.749809] Hardware name: ProLiant BL460c G1
[    5.749862] Modules linked in: bonding(+)
[    5.749978] Pid: 3177, comm: modprobe Not tainted 3.1.0-rc9-02177-gf2d1a4e-dirty #1157
[    5.750066] Call Trace:
[    5.750120]  [&lt;c1352c2f&gt;] ? printk+0x18/0x21
[    5.750176]  [&lt;c103112d&gt;] warn_slowpath_common+0x6d/0xa0
[    5.750231]  [&lt;c1060133&gt;] ? lockdep_init_map+0x1c3/0x460
[    5.750287]  [&lt;c1060133&gt;] ? lockdep_init_map+0x1c3/0x460
[    5.750342]  [&lt;c103117d&gt;] warn_slowpath_null+0x1d/0x20
[    5.750398]  [&lt;c1060133&gt;] lockdep_init_map+0x1c3/0x460
[    5.750453]  [&lt;c1355ddd&gt;] ? _raw_spin_unlock+0x1d/0x20
[    5.750510]  [&lt;c11255c8&gt;] ? sysfs_new_dirent+0x68/0x110
[    5.750565]  [&lt;c1124d4b&gt;] sysfs_add_file_mode+0x8b/0xe0
[    5.750621]  [&lt;c1124db3&gt;] sysfs_add_file+0x13/0x20
[    5.750675]  [&lt;c1124e7c&gt;] sysfs_create_file+0x1c/0x20
[    5.750737]  [&lt;c1208f09&gt;] class_create_file+0x19/0x20
[    5.750794]  [&lt;c12c186f&gt;] netdev_class_create_file+0xf/0x20
[    5.750853]  [&lt;f85deaf4&gt;] bond_create_sysfs+0x44/0x90 [bonding]
[    5.750911]  [&lt;f8410947&gt;] ? bond_create_proc_dir+0x1e/0x3e [bonding]
[    5.750970]  [&lt;f841007e&gt;] bond_net_init+0x7e/0x87 [bonding]
[    5.751026]  [&lt;f8410000&gt;] ? 0xf840ffff
[    5.751080]  [&lt;c12abc7a&gt;] ops_init.clone.4+0xba/0x100
[    5.751135]  [&lt;c12abdb2&gt;] ? register_pernet_subsys+0x12/0x30
[    5.751191]  [&lt;c12abd03&gt;] register_pernet_operations.clone.3+0x43/0x80
[    5.751249]  [&lt;c12abdb9&gt;] register_pernet_subsys+0x19/0x30
[    5.751306]  [&lt;f84108b9&gt;] bonding_init+0x832/0x8a2 [bonding]
[    5.751363]  [&lt;c10011f0&gt;] do_one_initcall+0x30/0x160
[    5.751420]  [&lt;f8410087&gt;] ? bond_net_init+0x87/0x87 [bonding]
[    5.751477]  [&lt;c106d5cf&gt;] sys_init_module+0xef/0x1890
[    5.751533]  [&lt;c1356490&gt;] sysenter_do_call+0x12/0x36
[    5.751588] ---[ end trace 89f492d83a7f5006 ]---

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Reported-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Tested-by: Eric Dumazet &lt;eric.dumazet@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>
When I made class_attr_bonding_matters per network namespace and dynamically
allocated I overlooked the need for calling sysfs_attr_init.  Oops.

This fixes the following lockdep splat:

[    5.749651] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[    5.749655] bonding: MII link monitoring set to 100 ms
[    5.749676] BUG: key f49a831c not in .data!
[    5.749677] ------------[ cut here ]------------
[    5.749752] WARNING: at kernel/lockdep.c:2897 lockdep_init_map+0x1c3/0x460()
[    5.749809] Hardware name: ProLiant BL460c G1
[    5.749862] Modules linked in: bonding(+)
[    5.749978] Pid: 3177, comm: modprobe Not tainted 3.1.0-rc9-02177-gf2d1a4e-dirty #1157
[    5.750066] Call Trace:
[    5.750120]  [&lt;c1352c2f&gt;] ? printk+0x18/0x21
[    5.750176]  [&lt;c103112d&gt;] warn_slowpath_common+0x6d/0xa0
[    5.750231]  [&lt;c1060133&gt;] ? lockdep_init_map+0x1c3/0x460
[    5.750287]  [&lt;c1060133&gt;] ? lockdep_init_map+0x1c3/0x460
[    5.750342]  [&lt;c103117d&gt;] warn_slowpath_null+0x1d/0x20
[    5.750398]  [&lt;c1060133&gt;] lockdep_init_map+0x1c3/0x460
[    5.750453]  [&lt;c1355ddd&gt;] ? _raw_spin_unlock+0x1d/0x20
[    5.750510]  [&lt;c11255c8&gt;] ? sysfs_new_dirent+0x68/0x110
[    5.750565]  [&lt;c1124d4b&gt;] sysfs_add_file_mode+0x8b/0xe0
[    5.750621]  [&lt;c1124db3&gt;] sysfs_add_file+0x13/0x20
[    5.750675]  [&lt;c1124e7c&gt;] sysfs_create_file+0x1c/0x20
[    5.750737]  [&lt;c1208f09&gt;] class_create_file+0x19/0x20
[    5.750794]  [&lt;c12c186f&gt;] netdev_class_create_file+0xf/0x20
[    5.750853]  [&lt;f85deaf4&gt;] bond_create_sysfs+0x44/0x90 [bonding]
[    5.750911]  [&lt;f8410947&gt;] ? bond_create_proc_dir+0x1e/0x3e [bonding]
[    5.750970]  [&lt;f841007e&gt;] bond_net_init+0x7e/0x87 [bonding]
[    5.751026]  [&lt;f8410000&gt;] ? 0xf840ffff
[    5.751080]  [&lt;c12abc7a&gt;] ops_init.clone.4+0xba/0x100
[    5.751135]  [&lt;c12abdb2&gt;] ? register_pernet_subsys+0x12/0x30
[    5.751191]  [&lt;c12abd03&gt;] register_pernet_operations.clone.3+0x43/0x80
[    5.751249]  [&lt;c12abdb9&gt;] register_pernet_subsys+0x19/0x30
[    5.751306]  [&lt;f84108b9&gt;] bonding_init+0x832/0x8a2 [bonding]
[    5.751363]  [&lt;c10011f0&gt;] do_one_initcall+0x30/0x160
[    5.751420]  [&lt;f8410087&gt;] ? bond_net_init+0x87/0x87 [bonding]
[    5.751477]  [&lt;c106d5cf&gt;] sys_init_module+0xef/0x1890
[    5.751533]  [&lt;c1356490&gt;] sysenter_do_call+0x12/0x36
[    5.751588] ---[ end trace 89f492d83a7f5006 ]---

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Reported-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Tested-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: Use a per netns implementation of /sys/class/net/bonding_masters.</title>
<updated>2011-10-19T23:24:15+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-10-12T21:56:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4c22400ab64d434a00ecbe0c655a16956c902aa8'/>
<id>4c22400ab64d434a00ecbe0c655a16956c902aa8</id>
<content type='text'>
This fixes a network namespace misfeature that bonding_masters looked at
current instead of the remembering the context where in which
/sys/class/net/bonding_masters was opened in to see which network
namespace to act upon.

This removes the need for sysfs to handle tagged directories with
untagged members allowing for a conceptually simpler sysfs
implementation.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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 fixes a network namespace misfeature that bonding_masters looked at
current instead of the remembering the context where in which
/sys/class/net/bonding_masters was opened in to see which network
namespace to act upon.

This removes the need for sysfs to handle tagged directories with
untagged members allowing for a conceptually simpler sysfs
implementation.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: fix string comparison errors</title>
<updated>2011-07-28T05:39:30+00:00</updated>
<author>
<name>Andy Gospodarek</name>
<email>andy@greyhouse.net</email>
</author>
<published>2011-07-26T11:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f4bb2e9c4fa9e5fdddf90589703613fd1a9c519f'/>
<id>f4bb2e9c4fa9e5fdddf90589703613fd1a9c519f</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: add min links parameter to 802.3ad</title>
<updated>2011-06-23T09:12:55+00:00</updated>
<author>
<name>stephen hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2011-06-22T09:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=655f8919d549ad1872e24d826b6ce42530516d2e'/>
<id>655f8919d549ad1872e24d826b6ce42530516d2e</id>
<content type='text'>
This adds support for a configuring the minimum number of links that
must be active before asserting carrier. It is similar to the Cisco
EtherChannel min-links feature. This allows setting the minimum number
of member ports that must be up (link-up state) before marking the
bond device as up (carrier on). This is useful for situations where
higher level services such as clustering want to ensure a minimum
number of low bandwidth links are active before switchover.

See:
   http://bugzilla.vyatta.com/show_bug.cgi?id=7196

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Flavio Leitner &lt;fbl@redhat.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>
This adds support for a configuring the minimum number of links that
must be active before asserting carrier. It is similar to the Cisco
EtherChannel min-links feature. This allows setting the minimum number
of member ports that must be up (link-up state) before marking the
bond device as up (carrier on). This is useful for situations where
higher level services such as clustering want to ensure a minimum
number of low bandwidth links are active before switchover.

See:
   http://bugzilla.vyatta.com/show_bug.cgi?id=7196

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Flavio Leitner &lt;fbl@redhat.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: make 802.3ad use latest lacp_rate</title>
<updated>2011-06-09T22:02:18+00:00</updated>
<author>
<name>Peter Pan(潘卫平)</name>
<email>panweiping3@gmail.com</email>
</author>
<published>2011-06-08T21:19:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba824a8b2d77942d51ce45ed721f65764c00ab50'/>
<id>ba824a8b2d77942d51ce45ed721f65764c00ab50</id>
<content type='text'>
There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port-&gt;actor_oper_port_state isn't changed.

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>
There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port-&gt;actor_oper_port_state isn't changed.

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: documentation and code cleanup for resend_igmp</title>
<updated>2011-05-25T21:55:33+00:00</updated>
<author>
<name>Flavio Leitner</name>
<email>fbl@redhat.com</email>
</author>
<published>2011-05-25T08:38:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94265cf5f731c7df29fdfde262ca3e6d51e6828c'/>
<id>94265cf5f731c7df29fdfde262ca3e6d51e6828c</id>
<content type='text'>
Improves the documentation about how IGMP resend parameter
works, fix two missing checks and coding style issues.

Signed-off-by: Flavio Leitner &lt;fbl@redhat.com&gt;
Acked-by: Rick Jones &lt;rick.jones2@hp.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>
Improves the documentation about how IGMP resend parameter
works, fix two missing checks and coding style issues.

Signed-off-by: Flavio Leitner &lt;fbl@redhat.com&gt;
Acked-by: Rick Jones &lt;rick.jones2@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<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>
</feed>
