===== net/core/neighbour.c 1.51 vs edited ===== --- 1.51/net/core/neighbour.c 2004-10-02 07:58:21 +10:00 +++ edited/net/core/neighbour.c 2004-10-02 17:47:11 +10:00 @@ -406,12 +406,6 @@ goto out; } - if (tbl->entries > (tbl->hash_mask + 1)) { - write_lock_bh(&tbl->lock); - neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1); - write_unlock_bh(&tbl->lock); - } - memcpy(n->primary_key, pkey, key_len); n->dev = dev; dev_hold(dev); @@ -432,6 +426,9 @@ n->confirmed = jiffies - (n->parms->base_reachable_time << 1); write_lock_bh(&tbl->lock); + + if (tbl->entries > (tbl->hash_mask + 1)) { + neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1); hash_val = tbl->hash(pkey, dev) & tbl->hash_mask;