aboutsummaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorFlorian Westphal2017-04-24 15:37:39 +0200
committerPablo Neira Ayuso2017-05-01 11:18:54 +0200
commit933bd83ed60e80ebb1aeb64a2f7cd3190d2312e2 (patch)
tree8432135759dbea3d42610e7014ff45fcb35eaff1 /usr
parent9a08ecfe74d7796ddc92ec312d3b7eaeba5a7c22 (diff)
netfilter: batch synchronize_net calls during hook unregister
synchronize_net is expensive and slows down netns cleanup a lot. We have two APIs to unregister a hook: nf_unregister_net_hook (which calls synchronize_net()) and nf_unregister_net_hooks (calls nf_unregister_net_hook in a loop) Make nf_unregister_net_hook a wapper around new helper __nf_unregister_net_hook, which unlinks the hook but does not free it. Then, we can call that helper in nf_unregister_net_hooks and then call synchronize_net() only once. Andrey Konovalov reports this change improves syzkaller fuzzing speed at least twice. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions