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: 4cc5b44b29 ("inetpeer: fix RCU lookup()")
Fixes: b145425f26 ("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>
This commit is contained in:
Eric Dumazet 2017-09-25 08:40:02 -07:00 коммит произвёл David S. Miller
Родитель 2d3924c218
Коммит 35f493b87e
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;