]> git.baikalelectronics.ru Git - kernel.git/commit
tcp/dccp: use rcu locking in inet_diag_find_one_icsk()
authorEric Dumazet <edumazet@google.com>
Fri, 1 Apr 2016 15:52:15 +0000 (08:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Apr 2016 02:11:19 +0000 (22:11 -0400)
commit4851d7b4c7f880b4181980934239df49de379057
tree5bf80c73627b0783603e8a46573db2cf50041280
parent2fa3538cce6f97d3d1f31dd42ba84eee9db69532
tcp/dccp: use rcu locking in inet_diag_find_one_icsk()

RX packet processing holds rcu_read_lock(), so we can remove
pairs of rcu_read_lock()/rcu_read_unlock() in lookup functions
if inet_diag also holds rcu before calling them.

This is needed anyway as __inet_lookup_listener() and
inet6_lookup_listener() will soon no longer increment
refcount on the found listener.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_diag.c
net/ipv4/inet_hashtables.c
net/ipv6/inet6_hashtables.c