aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_CT.c
diff options
context:
space:
mode:
authorLiping Zhang <zlpnobody@gmail.com>2017-05-07 22:01:55 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2017-05-15 12:42:29 +0200
commitd91fc59cd77c719f33eda65c194ad8f95a055190 (patch)
treeb39d63460a1b261518ed0fecc72a7ff1cff320c8 /net/netfilter/xt_CT.c
parentd110a3942aca78d14929bc648aeb83ee0b245a61 (diff)
downloadlinux-d91fc59cd77c719f33eda65c194ad8f95a055190.tar.gz
netfilter: introduce nf_conntrack_helper_put helper function
And convert module_put invocation to nf_conntrack_helper_put, this is prepared for the followup patch, which will add a refcnt for cthelper, so we can reject the deleting request when cthelper is in use. Signed-off-by: Liping Zhang <zlpnobody@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_CT.c')
-rw-r--r--net/netfilter/xt_CT.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index bb7ad82dcd5603..623ef37de886fa 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -96,7 +96,7 @@ xt_ct_set_helper(struct nf_conn *ct, const char *helper_name,
help = nf_ct_helper_ext_add(ct, helper, GFP_KERNEL);
if (help == NULL) {
- module_put(helper->me);
+ nf_conntrack_helper_put(helper);
return -ENOMEM;
}
@@ -263,7 +263,7 @@ out:
err4:
help = nfct_help(ct);
if (help)
- module_put(help->helper->me);
+ nf_conntrack_helper_put(help->helper);
err3:
nf_ct_tmpl_free(ct);
err2:
@@ -346,7 +346,7 @@ static void xt_ct_tg_destroy(const struct xt_tgdtor_param *par,
if (ct) {
help = nfct_help(ct);
if (help)
- module_put(help->helper->me);
+ nf_conntrack_helper_put(help->helper);
nf_ct_netns_put(par->net, par->family);