* [PATCH net] inetpeer: fix RCU lookup() again
@ 2017-09-25 15:40 Eric Dumazet
2017-09-28 16:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2017-09-25 15:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
My prior fix was not complete, as we were dereferencing a pointer
three times per node, not twice as I initially thought.
Fixes: 4cc5b44b29a9 ("inetpeer: fix RCU lookup()")
Fixes: b145425f269a ("inetpeer: remove AVL implementation in favor of RB tree")
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/inetpeer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index e7eb590c86ce2b33654c17c61619de74ff07bfd1..b20c8ac640811e1b4c5416134181dd77675db878 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -128,9 +128,9 @@ static struct inet_peer *lookup(const struct inetpeer_addr *daddr,
break;
}
if (cmp == -1)
- pp = &(*pp)->rb_left;
+ pp = &next->rb_left;
else
- pp = &(*pp)->rb_right;
+ pp = &next->rb_right;
}
*parent_p = parent;
*pp_p = pp;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] inetpeer: fix RCU lookup() again
2017-09-25 15:40 [PATCH net] inetpeer: fix RCU lookup() again Eric Dumazet
@ 2017-09-28 16:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-09-28 16:40 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 25 Sep 2017 08:40:02 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> My prior fix was not complete, as we were dereferencing a pointer
> three times per node, not twice as I initially thought.
>
> Fixes: 4cc5b44b29a9 ("inetpeer: fix RCU lookup()")
> Fixes: b145425f269a ("inetpeer: remove AVL implementation in favor of RB tree")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-28 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 15:40 [PATCH net] inetpeer: fix RCU lookup() again Eric Dumazet
2017-09-28 16:40 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.