]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: try not to take rtnl_lock in ip6mr_sk_done
authorFrancesco Ruggeri <fruggeri@arista.com>
Wed, 8 Nov 2017 19:23:46 +0000 (11:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Nov 2017 01:13:04 +0000 (10:13 +0900)
commitcf1bd3f2e42d6ed4f8f7e4e3dc1c85b72490ad1e
tree597daa1cb98dba8fe8c2b679646ae7a9c8f0fa41
parent6bab421c4c95abf3775bb8f18827c3c36542da48
ipv6: try not to take rtnl_lock in ip6mr_sk_done

Avoid traversing the list of mr6_tables (which requires the
rtnl_lock) in ip6mr_sk_done(), when we know in advance that
a match will not be found.
This can happen when rawv6_close()/ip6mr_sk_done() is invoked
on non-mroute6 sockets.
This patch helps reduce rtnl_lock contention when destroying
a large number of net namespaces, each having a non-mroute6
raw socket.

v2: same patch, only fixed subject line and expanded comment.

Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6mr.c