summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
authorJay Vosburgh2006-01-09 21:14:00 +0100
committerJeff Garzik2006-01-12 22:35:39 +0100
commit5af47b2ff124fdad9ba84baeb9f7eeebeb227b43 (patch)
tree1085c636295cd3f9ade5611f9519d83731e27cdc /drivers/net/bonding/bond_alb.c
parent[PATCH] wireless/atmel: add IWENCODEEXT, IWAUTH, and association event support (diff)
downloadkernel-qcow2-linux-5af47b2ff124fdad9ba84baeb9f7eeebeb227b43.tar.gz
kernel-qcow2-linux-5af47b2ff124fdad9ba84baeb9f7eeebeb227b43.tar.xz
kernel-qcow2-linux-5af47b2ff124fdad9ba84baeb9f7eeebeb227b43.zip
[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>
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r--drivers/net/bonding/bond_alb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 854ddfb90da1..f2a63186ae05 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -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 */