[PATCH] bonding: UPDATED hash-table corruption in bond_alb.c

I believe I see the race Michael refers to (tlb_choose_channel
may set head, which tlb_init_slave clears), although I was not able to
reproduce it. I have updated his patch for the current netdev-2.6.git
tree and added a version update. His original comment follows:

Our systems have been crashing during testing of PCI HotPlug
support in the various networking components. We've faulted in
the bonding driver due to a bug in bond_alb.c:tlb_clear_slave()

In that routine, the last modification to the TLB hash table is
made without protection of the lock, allowing a race that can lead
tlb_choose_channel() to select an invalid table element.

-J

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by Jay Vosburgh and committed by Jeff Garzik 5af47b2f 9a6301c1

+4 -4
+2 -2
drivers/net/bonding/bond_alb.c
··· 169 169 index = next_index; 170 170 } 171 171 172 - _unlock_tx_hashtbl(bond); 173 - 174 172 tlb_init_slave(slave); 173 + 174 + _unlock_tx_hashtbl(bond); 175 175 } 176 176 177 177 /* Must be called before starting the monitor timer */
+2 -2
drivers/net/bonding/bonding.h
··· 22 22 #include "bond_3ad.h" 23 23 #include "bond_alb.h" 24 24 25 - #define DRV_VERSION "3.0.0" 26 - #define DRV_RELDATE "November 8, 2005" 25 + #define DRV_VERSION "3.0.1" 26 + #define DRV_RELDATE "January 9, 2006" 27 27 #define DRV_NAME "bonding" 28 28 #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" 29 29