All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liping Zhang <zlpnobody@gmail.com>
To: gfree.wind@vip.163.com
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	Florian Westphal <fw@strlen.de>,
	Netfilter Developer Mailing List
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nf v6 3/3] netfilter: nat_helper: Remove the expectations when its module is unloaded
Date: Fri, 5 May 2017 09:59:06 +0800	[thread overview]
Message-ID: <CAML_gOfbrRG8LDD11PzpMmGqnq0-JpXKGk4Z=OJH3gEDnzCCxg@mail.gmail.com> (raw)
In-Reply-To: <1493945713-67263-3-git-send-email-gfree.wind@vip.163.com>

Hi Feng,

2017-05-05 8:55 GMT+08:00  <gfree.wind@vip.163.com>:
[...]
> +static void
> +nf_ct_flush_expect(const struct module *me)
> +{
> +       struct nf_conntrack_expect *exp;
> +       const struct hlist_node *next;
> +       u32 i;
> +
> +       if (!me)
> +               return;
> +
> +       /* Get rid of expectations */
> +       spin_lock_bh(&nf_conntrack_expect_lock);
> +       for (i = 0; i < nf_ct_expect_hsize; i++) {
> +               hlist_for_each_entry_safe(exp, next,
> +                                         &nf_ct_expect_hash[i], hnode) {
> +                       struct nf_conn_help *master_help = nfct_help(exp->master);
> +
> +                       if ((master_help->helper && master_help->helper->me == me) ||
> +                           (exp->helper && exp->helper->me == me) ||
> +                           (exp->nat_helper && exp->nat_helper->me == me)) {
> +                               /* This expect belongs to the dying module */
> +                               if (del_timer(&exp->timeout)) {
> +                                       nf_ct_unlink_expect(exp);
> +                                       nf_ct_expect_put(exp);
> +                               }

Is this should be replaced with your helper function nf_ct_remove_expect()?

> +                       }
> +               }
> +       }
> +       spin_unlock_bh(&nf_conntrack_expect_lock);

  reply	other threads:[~2017-05-05  1:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05  0:55 [PATCH nf v6 1/3] netfilter: helper: Rename struct nf_ct_helper_expectfn to nf_ct_nat_helper gfree.wind
2017-05-05  0:55 ` [PATCH nf v6 2/3] netfilter: nat_helper: Register one nf_ct_nat_helper each proto nat module gfree.wind
2017-05-15 17:20   ` Pablo Neira Ayuso
2017-05-05  0:55 ` [PATCH nf v6 3/3] netfilter: nat_helper: Remove the expectations when its module is unloaded gfree.wind
2017-05-05  1:59   ` Liping Zhang [this message]
2017-05-05  2:16     ` Gao Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAML_gOfbrRG8LDD11PzpMmGqnq0-JpXKGk4Z=OJH3gEDnzCCxg@mail.gmail.com' \
    --to=zlpnobody@gmail.com \
    --cc=fw@strlen.de \
    --cc=gfree.wind@vip.163.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.