]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: fix double dev_add_pack
authorJay Vosburgh <fubar@us.ibm.com>
Thu, 1 Mar 2007 01:03:20 +0000 (17:03 -0800)
committerJeff Garzik <jeff@garzik.org>
Tue, 6 Mar 2007 11:08:11 +0000 (06:08 -0500)
commit0f8db8122c1a03ad87b76dfe266902f2efce5c2e
tree2d5b172fe18c84029619b3a5dca524a24f9c4e49
parent17a0a05465befba37e625be076f4045122fc2295
bonding: fix double dev_add_pack

Bonding can erroneously register the same packet_type to receive
ARPs (for use by ARP validation): once at device open time, and once via
sysfs.  Since sysfs can change the validate setting (and thus register
or unregister) at any time, a flag is needed to synchronize with device
open in order to avoid double registrations, and the simplest place is
within the packet_type structure itself.  Double unregister is not an
issue.

Bug reported by Ulrich Oelmann <ulrich.oelmann@web.de>.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/bonding/bond_main.c