From: Scott Doty <scott@sonic.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
linux-kernel@vger.kernel.org, davem@redhat.com
Subject: Re: 2.4.28(+?): Strange ARP problem
Date: Thu, 13 Jan 2005 14:01:00 -0800 [thread overview]
Message-ID: <20050113220100.GC25475@sonic.net> (raw)
In-Reply-To: <20050113210142.GA27481@gondor.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
On Fri, Jan 14, 2005 at 08:01:42AM +1100, Herbert Xu wrote:
> On Thu, Jan 13, 2005 at 10:09:00AM -0200, Marcelo Tosatti wrote:
> >
> > Maybe you can try earlier v2.4.28's (-rc1 for one) to check where
> > the problem starts to happen?
>
> The symptom sounds like the bug in the 2.4 backport of the neighbour
> hash updates. In neigh_create, hash_val needs to be computed inside
> the lock (and after the growing), not outside.
>
> Someone even posted a patch for it. I'll dig it up tonight if it
> doesn't show up by then.
I just built a patch from your description -- it's attached.
-Scott
[-- Attachment #2: patch-arp --]
[-- Type: text/plain, Size: 606 bytes --]
--- linux-2.4.29-rc2/net/core/neighbour.c 2005/01/13 21:55:06 1.1
+++ linux-2.4.29-rc2/net/core/neighbour.c 2005/01/13 21:56:32
@@ -427,11 +427,12 @@
n->confirmed = jiffies - (n->parms->base_reachable_time<<1);
- hash_val = tbl->hash(pkey, dev) & tbl->hash_mask;
-
write_lock_bh(&tbl->lock);
if (atomic_read(&tbl->entries) > (tbl->hash_mask + 1))
neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1);
+
+ hash_val = tbl->hash(pkey, dev) & tbl->hash_mask;
+
for (n1 = tbl->hash_buckets[hash_val]; n1; n1 = n1->next) {
if (dev == n1->dev &&
memcmp(n1->primary_key, pkey, key_len) == 0) {
next prev parent reply other threads:[~2005-01-14 0:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-13 14:50 2.4.28(+?): Strange ARP problem Scott Doty
2005-01-13 12:09 ` Marcelo Tosatti
2005-01-13 16:18 ` Scott Doty
2005-01-13 21:01 ` Herbert Xu
2005-01-13 22:01 ` Scott Doty [this message]
2005-01-13 22:15 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050113220100.GC25475@sonic.net \
--to=scott@sonic.net \
--cc=davem@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox