summaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_TEE.c
diff options
context:
space:
mode:
authorFlorian Westphal2015-07-14 17:51:09 +0200
committerPablo Neira Ayuso2015-07-15 18:18:06 +0200
commitdcebd3153e0a7749bb054ab73fa4e1ca33e9d3f9 (patch)
treeb962b7b1bca5b3c8272781c991a9878fdfe4e880 /net/netfilter/xt_TEE.c
parentnetfilter: xtables: don't save/restore jumpstack offset (diff)
downloadkernel-qcow2-linux-dcebd3153e0a7749bb054ab73fa4e1ca33e9d3f9.tar.gz
kernel-qcow2-linux-dcebd3153e0a7749bb054ab73fa4e1ca33e9d3f9.tar.xz
kernel-qcow2-linux-dcebd3153e0a7749bb054ab73fa4e1ca33e9d3f9.zip
netfilter: add and use jump label for xt_tee
Don't bother testing if we need to switch to alternate stack unless TEE target is used. Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_TEE.c')
-rw-r--r--net/netfilter/xt_TEE.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c
index 8950e79c4dc9..c5d6556dbc5e 100644
--- a/net/netfilter/xt_TEE.c
+++ b/net/netfilter/xt_TEE.c
@@ -251,6 +251,7 @@ static int tee_tg_check(const struct xt_tgchk_param *par)
} else
info->priv = NULL;
+ static_key_slow_inc(&xt_tee_enabled);
return 0;
}
@@ -262,6 +263,7 @@ static void tee_tg_destroy(const struct xt_tgdtor_param *par)
unregister_netdevice_notifier(&info->priv->notifier);
kfree(info->priv);
}
+ static_key_slow_dec(&xt_tee_enabled);
}
static struct xt_target tee_tg_reg[] __read_mostly = {