]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: fix set mode race conditions
authornikolay@redhat.com <nikolay@redhat.com>
Sat, 18 May 2013 01:18:28 +0000 (01:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 May 2013 06:25:49 +0000 (23:25 -0700)
commitf1c6dc0003cffdad28cafc08dacd84a45342716e
tree3eb87d6856598772743b4fe8088468c7de09d8bb
parent321ec4b60647cc391b41c5b4ff3dd21d770dea3e
bonding: fix set mode race conditions

Changing the mode without any locking can result in multiple races (e.g.
upping a bond, enslaving/releasing). Depending on which race is hit the
impact can vary from incosistent bond state to kernel crash.
Use RTNL to synchronize the mode setting with the dangerous races.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_sysfs.c