diff options
author | Neil Horman | 2013-09-27 18:22:15 +0200 |
---|---|---|
committer | David S. Miller | 2013-10-01 06:10:55 +0200 |
commit | 5a0068deb611109c5ba77358be533f763f395ee4 (patch) | |
tree | 68be4d3a282a5b6599133a6b9590b7c90562fda6 /lib/net_utils.c | |
parent | tcp: TSQ can use a dynamic limit (diff) | |
download | kernel-qcow2-linux-5a0068deb611109c5ba77358be533f763f395ee4.tar.gz kernel-qcow2-linux-5a0068deb611109c5ba77358be533f763f395ee4.tar.xz kernel-qcow2-linux-5a0068deb611109c5ba77358be533f763f395ee4.zip |
bonding: Fix broken promiscuity reference counting issue
Recently grabbed this report:
https://bugzilla.redhat.com/show_bug.cgi?id=1005567
Of an issue in which the bonding driver, with an attached vlan encountered the
following errors when bond0 was taken down and back up:
dummy1: promiscuity touches roof, set promiscuity failed. promiscuity feature of
device might be broken.
The error occurs because, during __bond_release_one, if we release our last
slave, we take on a random mac address and issue a NETDEV_CHANGEADDR
notification. With an attached vlan, the vlan may see that the vlan and bond
mac address were in sync, but no longer are. This triggers a call to dev_uc_add
and dev_set_rx_mode, which enables IFF_PROMISC on the bond device. Then, when
we complete __bond_release_one, we use the current state of the bond flags to
determine if we should decrement the promiscuity of the releasing slave. But
since the bond changed promiscuity state during the release operation, we
incorrectly decrement the slave promisc count when it wasn't in promiscuous mode
to begin with, causing the above error
Fix is pretty simple, just cache the bonding flags at the start of the function
and use those when determining the need to set promiscuity.
This is also needed for the ALLMULTI flag
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: Mark Wu <wudxw@linux.vnet.ibm.com>
CC: "David S. Miller" <davem@davemloft.net>
Reported-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions