[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aad592f0-e815-55a0-0da3-1fd52ce3322c@akamai.com>
Date: Mon, 7 Nov 2016 11:03:51 -0500
From: Jason Baron <jbaron@...mai.com>
To: Alexander Duyck <alexander.h.duyck@...el.com>,
<netdev@...r.kernel.org>, <alexander.duyck@...il.com>
CC: Andy Whitcroft <apw@...onical.com>, <davem@...emloft.net>
Subject: Re: [net PATCH] fib_trie: Correct /proc/net/route off by one error
On 11/04/2016 03:11 PM, Alexander Duyck wrote:
> The display of /proc/net/route has had a couple issues due to the fact that
> when I originally rewrote most of fib_trie I made it so that the iterator
> was tracking the next value to use instead of the current.
>
> In addition it had an off by 1 error where I was tracking the first piece
> of data as position 0, even though in reality that belonged to the
> SEQ_START_TOKEN.
>
> This patch updates the code so the iterator tracks the last reported
> position and key instead of the next expected position and key. In
> addition it shifts things so that all of the leaves start at 1 instead of
> trying to report leaves starting with offset 0 as being valid. With these
> two issues addressed this should resolve any off by one errors that were
> present in the display of /proc/net/route.
>
> Fixes: 25b97c016b26 ("ipv4: off-by-one in continuation handling in /proc/net/route")
> Cc: Andy Whitcroft <apw@...onical.com>
> Reported-by: Jason Baron <jbaron@...mai.com>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...el.com>
> ---
> net/ipv4/fib_trie.c | 21 +++++++++------------
> 1 file changed, 9 insertions(+), 12 deletions(-)
>
Ok. Works for me.
Feel free to add:
Reviewed-and-Tested-by: Jason Baron <jbaron@...mai.com>
Thanks,
-Jason
Powered by blists - more mailing lists