From: Andrew Morton <akpm@osdl.org>
To: netdev@vger.kernel.org
Cc: Jari Takkala <jari.takkala@q9.com>
Subject: [patch] neighbour.c, pneigh_get_next() skips published entry
Date: Mon, 25 Sep 2006 16:45:35 -0700 [thread overview]
Message-ID: <20060925164535.4245ee02.akpm@osdl.org> (raw)
I've been sitting on this patch because afaik the problem which it purports
to fix remains unfixed.
Should I drop it??
Thanks.
From: "Jari Takkala" <Jari.Takkala@Q9.com>
Fix a problem where output from /proc/net/arp skips a record when the full
output does not fit into the users read() buffer.
To reproduce: publish a large number of ARP entries (more than 10 required
on my system). Run 'dd if=/proc/net/arp of=arp-1024.out bs=1024'. View
the output, one entry will be missing.
Signed-off-by: Jari Takkala <jari.takkala@q9.com>
[akpm: submitted before, discussion ended inconclusively, iirc]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
net/core/neighbour.c | 6 ++++++
1 file changed, 6 insertions(+)
diff -puN net/core/neighbour.c~neighbourc-pneigh_get_next-skips-published-entry net/core/neighbour.c
--- a/net/core/neighbour.c~neighbourc-pneigh_get_next-skips-published-entry
+++ a/net/core/neighbour.c
@@ -2209,6 +2209,12 @@ static struct pneigh_entry *pneigh_get_n
struct neigh_seq_state *state = seq->private;
struct neigh_table *tbl = state->tbl;
+ if (pos != NULL && *pos == 1 &&
+ (pn->next || tbl->phash_buckets[state->bucket])) {
+ --(*pos);
+ return pn;
+ }
+
pn = pn->next;
while (!pn) {
if (++state->bucket > PNEIGH_HASHMASK)
_
next reply other threads:[~2006-09-25 23:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 23:45 Andrew Morton [this message]
2006-09-25 23:47 ` [patch] neighbour.c, pneigh_get_next() skips published entry David Miller
2006-09-26 0:34 ` Andrew Morton
2006-09-26 5:59 ` Philip Craig
2006-09-27 11:12 ` Herbert Xu
-- strict thread matches above, loose matches on Subject: below --
2006-05-11 16:29 [PATCH] " Jari Takkala
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=20060925164535.4245ee02.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jari.takkala@q9.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).