Skip to content

Commit 35f493b

Browse files
edumazetdavem330
authored andcommitted
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: 4cc5b44 ("inetpeer: fix RCU lookup()") Fixes: b145425 ("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>
1 parent 2d3924c commit 35f493b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/inetpeer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ static struct inet_peer *lookup(const struct inetpeer_addr *daddr,
128128
break;
129129
}
130130
if (cmp == -1)
131-
pp = &(*pp)->rb_left;
131+
pp = &next->rb_left;
132132
else
133-
pp = &(*pp)->rb_right;
133+
pp = &next->rb_right;
134134
}
135135
*parent_p = parent;
136136
*pp_p = pp;

0 commit comments

Comments
 (0)