Re: [PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-18 Thread David Miller
From: David Ahern 
Date: Thu, 18 Oct 2018 09:16:17 -0600

> On 10/17/18 11:36 PM, David Miller wrote:
>> From: Nikolay Aleksandrov 
>> Date: Wed, 17 Oct 2018 22:34:34 +0300
>> 
>>> If the skb space ends in an unresolved entry while dumping we'll miss
>>> some unresolved entries. The reason is due to zeroing the entry counter
>>> between dumping resolved and unresolved mfc entries. We should just
>>> keep counting until the whole table is dumped and zero when we move to
>>> the next as we have a separate table counter.
>>>
>>> Reported-by: Colin Ian King 
>>> Fixes: 8fb472c09b9d ("ipmr: improve hash scalability")
>>> Signed-off-by: Nikolay Aleksandrov 
>> 
>> Applied and queued up for -stable.
>> 
> 
> FYI: on the net to net-next merge, those 2 lines were moved to
> mr_table_dump.

Thanks for the heads up.


Re: [PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-18 Thread David Ahern
On 10/17/18 11:36 PM, David Miller wrote:
> From: Nikolay Aleksandrov 
> Date: Wed, 17 Oct 2018 22:34:34 +0300
> 
>> If the skb space ends in an unresolved entry while dumping we'll miss
>> some unresolved entries. The reason is due to zeroing the entry counter
>> between dumping resolved and unresolved mfc entries. We should just
>> keep counting until the whole table is dumped and zero when we move to
>> the next as we have a separate table counter.
>>
>> Reported-by: Colin Ian King 
>> Fixes: 8fb472c09b9d ("ipmr: improve hash scalability")
>> Signed-off-by: Nikolay Aleksandrov 
> 
> Applied and queued up for -stable.
> 

FYI: on the net to net-next merge, those 2 lines were moved to
mr_table_dump.


Re: [PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-17 Thread David Miller
From: Nikolay Aleksandrov 
Date: Wed, 17 Oct 2018 22:34:34 +0300

> If the skb space ends in an unresolved entry while dumping we'll miss
> some unresolved entries. The reason is due to zeroing the entry counter
> between dumping resolved and unresolved mfc entries. We should just
> keep counting until the whole table is dumped and zero when we move to
> the next as we have a separate table counter.
> 
> Reported-by: Colin Ian King 
> Fixes: 8fb472c09b9d ("ipmr: improve hash scalability")
> Signed-off-by: Nikolay Aleksandrov 

Applied and queued up for -stable.


Re: [PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-17 Thread Nikolay Aleksandrov
On 17/10/2018 22:34, Nikolay Aleksandrov wrote:
> If the skb space ends in an unresolved entry while dumping we'll miss
> some unresolved entries. The reason is due to zeroing the entry counter
> between dumping resolved and unresolved mfc entries. We should just
> keep counting until the whole table is dumped and zero when we move to
> the next as we have a separate table counter.
> 
> Reported-by: Colin Ian King 
> Fixes: 8fb472c09b9d ("ipmr: improve hash scalability")
> Signed-off-by: Nikolay Aleksandrov 
> ---
> Dropped Yuval's mail because it bounces.
> 
>  net/ipv4/ipmr_base.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/net/ipv4/ipmr_base.c b/net/ipv4/ipmr_base.c
> index 1ad9aa62a97b..eab8cd5ec2f5 100644
> --- a/net/ipv4/ipmr_base.c
> +++ b/net/ipv4/ipmr_base.c
> @@ -296,8 +296,6 @@ int mr_rtm_dumproute(struct sk_buff *skb, struct 
> netlink_callback *cb,
>  next_entry:
>   e++;
>   }
> - e = 0;
> - s_e = 0;
>  
>   spin_lock_bh(lock);
>   list_for_each_entry(mfc, >mfc_unres_queue, list) {
> 

+CC Colin
Sorry about that, my script somehow missed the reported-by email.



[PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-17 Thread Nikolay Aleksandrov
If the skb space ends in an unresolved entry while dumping we'll miss
some unresolved entries. The reason is due to zeroing the entry counter
between dumping resolved and unresolved mfc entries. We should just
keep counting until the whole table is dumped and zero when we move to
the next as we have a separate table counter.

Reported-by: Colin Ian King 
Fixes: 8fb472c09b9d ("ipmr: improve hash scalability")
Signed-off-by: Nikolay Aleksandrov 
---
Dropped Yuval's mail because it bounces.

 net/ipv4/ipmr_base.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/ipv4/ipmr_base.c b/net/ipv4/ipmr_base.c
index 1ad9aa62a97b..eab8cd5ec2f5 100644
--- a/net/ipv4/ipmr_base.c
+++ b/net/ipv4/ipmr_base.c
@@ -296,8 +296,6 @@ int mr_rtm_dumproute(struct sk_buff *skb, struct 
netlink_callback *cb,
 next_entry:
e++;
}
-   e = 0;
-   s_e = 0;
 
spin_lock_bh(lock);
list_for_each_entry(mfc, >mfc_unres_queue, list) {
-- 
2.17.2