netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: johunt@akamai.com, kaber@trash.net, dbavatar@gmail.com,
	netdev@vger.kernel.org, yoshfuji@linux-ipv6.org,
	jmorris@namei.org, pekkas@netcore.fi, kuznet@ms2.inr.ac.ru,
	linux-kernel@vger.kernel.org, greearb@candelatech.com
Subject: Re: Bug in net/ipv6/ip6_fib.c:fib6_dump_table()
Date: Mon, 25 Jun 2012 15:40:47 -0700 (PDT)	[thread overview]
Message-ID: <20120625.154047.462435723648654696.davem@davemloft.net> (raw)
In-Reply-To: <1340429851.4604.11942.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 23 Jun 2012 07:37:31 +0200

> [PATCH] ipv6: fib: fix fib dump restart
> 
> Commit 2bec5a369ee79576a3 (ipv6: fib: fix crash when changing large fib
> while dumping it) introduced ability to restart the dump at tree root,
> but failed to skip correctly a count of already dumped entries. Code
> didn't match Patrick intent.
> 
> We must skip exactly the number of already dumped entries.
> 
> Note that like other /proc/net files or netlink producers, we could
> still dump some duplicates entries.
> 
> Reported-by: Debabrata Banerjee <dbavatar@gmail.com>
> Reported-by: Josh Hunt <johunt@akamai.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

I've applied this.

But I wonder if it does the right thing, to be honest.

When tree change is detected, w->skip is set to w->count

But with your change, w->count won't be the number of entries to
skip from the root after the first time we handle a tree change.

So on the second tree change, we'll skip the wrong number of
entries, since the w->count we save into w->skip will be biased
by the previous w->skip value.  So we'll skip too few entries.

      parent reply	other threads:[~2012-06-25 22:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 17:22 Bug in net/ipv6/ip6_fib.c:fib6_dump_table() Debabrata Banerjee
2012-06-21 19:35 ` Josh Hunt
2012-06-21 20:27   ` Eric Dumazet
2012-06-21 21:50     ` Alexey Kuznetsov
2012-06-22  3:34       ` Gao feng
2012-06-22  6:49     ` Josh Hunt
2012-06-22  8:29       ` Eric Dumazet
2012-06-22 13:44         ` Josh Hunt
2012-06-22 18:13           ` Eric Dumazet
2012-06-22 21:12             ` Debabrata Banerjee
2012-06-23  0:02             ` David Miller
2012-06-23  5:37               ` Eric Dumazet
2012-06-23 20:55                 ` Alexey Kuznetsov
2012-06-23 23:02                   ` David Miller
2012-06-25 22:40                 ` David Miller [this message]

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=20120625.154047.462435723648654696.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dbavatar@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=greearb@candelatech.com \
    --cc=jmorris@namei.org \
    --cc=johunt@akamai.com \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pekkas@netcore.fi \
    --cc=yoshfuji@linux-ipv6.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).