Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35f493b8 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: 4cc5b44b ("inetpeer: fix RCU lookup()")
Fixes: b145425f ("inetpeer: remove AVL implementation in favor of RB tree")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2d3924c2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;