diff options
author | Eric Dumazet <edumazet@google.com> | 2017-09-25 11:40:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-28 12:39:34 -0400 |
commit | 35f493b87ec072c5a2497ffbee243095ef725827 (patch) | |
tree | 0ba331cf269c9890debdf6f6606b2239a24341a6 | |
parent | 2d3924c2181a4000aa4c118fc3685b5e93a45bd6 (diff) |
inetpeer: fix RCU lookup() again
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/inetpeer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index e7eb590c86ce..b20c8ac64081 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, | |||
128 | break; | 128 | break; |
129 | } | 129 | } |
130 | if (cmp == -1) | 130 | if (cmp == -1) |
131 | pp = &(*pp)->rb_left; | 131 | pp = &next->rb_left; |
132 | else | 132 | else |
133 | pp = &(*pp)->rb_right; | 133 | pp = &next->rb_right; |
134 | } | 134 | } |
135 | *parent_p = parent; | 135 | *parent_p = parent; |
136 | *pp_p = pp; | 136 | *pp_p = pp; |