Skip to content

Commit

Permalink
[PATCH] bonding: UPDATED hash-table corruption in bond_alb.c
Browse files Browse the repository at this point in the history
	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>
  • Loading branch information
Jay Vosburgh authored and Jeff Garzik committed Jan 12, 2006
1 parent 9a6301c commit 5af47b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
index = next_index;
}

_unlock_tx_hashtbl(bond);

tlb_init_slave(slave);

_unlock_tx_hashtbl(bond);
}

/* Must be called before starting the monitor timer */
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/bonding/bonding.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "bond_3ad.h"
#include "bond_alb.h"

#define DRV_VERSION "3.0.0"
#define DRV_RELDATE "November 8, 2005"
#define DRV_VERSION "3.0.1"
#define DRV_RELDATE "January 9, 2006"
#define DRV_NAME "bonding"
#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"

Expand Down

0 comments on commit 5af47b2

Please sign in to comment.