]> git.kernelconcepts.de Git - mv-sheeva.git/commit
bonding 802.3ad: Fix the state machine locking v2
authorNils Carlson <nils.carlson@ericsson.com>
Thu, 3 Mar 2011 22:09:11 +0000 (22:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Mar 2011 00:02:17 +0000 (16:02 -0800)
commit16d79d7dc98e56d4700054b9b785a92102d8998c
tree975e808eed2b39d12fd09bb884fc24dd013410d6
parentce3c869283739379134e1a90c37dd1a30b5f31b7
bonding 802.3ad: Fix the state machine locking v2

Changes since v1:
* Clarify an unclear comment
* Move a (possible) name change to a separate patch

The ad_rx_machine, ad_periodic_machine and ad_port_selection_logic
functions all inspect and alter common fields within the port structure.
Previous to this patch, only the ad_rx_machines were mutexed, and the
periodic and port_selection could run unmutexed against an ad_rx_machine
trigged by an arriving LACPDU.

This patch remedies the situation by protecting all the state machines
from concurrency. This is accomplished by locking around all the state
machines for a given port, which are executed at regular intervals; and
the ad_rx_machine when handling an incoming LACPDU.

Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_3ad.c