mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
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>
This commit is contained in:
parent
d110a3942a
commit
d91fc59cd7
5 changed files with 15 additions and 7 deletions
|
@ -1123,7 +1123,7 @@ static int ovs_ct_add_helper(struct ovs_conntrack_info *info, const char *name,
|
|||
|
||||
help = nf_ct_helper_ext_add(info->ct, helper, GFP_KERNEL);
|
||||
if (!help) {
|
||||
module_put(helper->me);
|
||||
nf_conntrack_helper_put(helper);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -1584,7 +1584,7 @@ void ovs_ct_free_action(const struct nlattr *a)
|
|||
static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info)
|
||||
{
|
||||
if (ct_info->helper)
|
||||
module_put(ct_info->helper->me);
|
||||
nf_conntrack_helper_put(ct_info->helper);
|
||||
if (ct_info->ct)
|
||||
nf_ct_tmpl_free(ct_info->ct);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue