]> git.baikalelectronics.ru Git - kernel.git/commit
inetpeer: fix RCU lookup()
authorEric Dumazet <edumazet@google.com>
Fri, 1 Sep 2017 21:03:32 +0000 (14:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Sep 2017 00:33:17 +0000 (17:33 -0700)
commit63b026ba7503b40d23878dcfb2514dc64f805741
tree2a98212b93c7c09a10a29c57754f3bc8cde99627
parent1a3521a8e83d7f411f367d4c37e3741b0877538d
inetpeer: fix RCU lookup()

Excess of seafood or something happened while I cooked the commit
adding RB tree to inetpeer.

Of course, RCU rules need to be respected or bad things can happen.

In this particular loop, we need to read *pp once per iteration, not
twice.

Fixes: 4faacd04d4f4 ("inetpeer: remove AVL implementation in favor of RB tree")
Reported-by: John Sperbeck <jsperbeck@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inetpeer.c