bonding: 802.3ad - fix agg_device_up
commit86ea9b89a0e49eba68dc3b8e322f63763806573d
authorJiri Bohac <jbohac@suse.cz>
Tue, 19 Apr 2011 02:09:55 +0000 (19 02:09 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 01:33:53 +0000 (3 10:33 +0900)
tree5d925feb8c66c5a1d9c00a47877f18851105d629
parentaf2d3c5a7d5bf8305a6930f866b865284e3db3f4
bonding: 802.3ad - fix agg_device_up

[ Upstream commit 2430af8b7fa37ac0be102c77f9dc6ee669d24ba9 ]

The slave member of struct aggregator does not necessarily point
to a slave which is part of the aggregator. It points to the
slave structure containing the aggregator structure, while
completely different slaves (or no slaves at all) may be part of
the aggregator.

The agg_device_up() function wrongly uses agg->slave to find the state
of the aggregator.  Use agg->lag_ports->slave instead. The bug has
been introduced by commit 4cd6fe1c6483cde93e2ec91f58b7af9c9eea51ad
("bonding: fix link down handling in 802.3ad mode").

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/bonding/bond_3ad.c