From: Florian Westphal <fw@strlen.de>
To: Joe Stringer <joe@ovn.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
netdev <netdev@vger.kernel.org>,
netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH net] netfilter: nf_conntrack: Use net_mutex for helper unregistration.
Date: Sat, 7 May 2016 11:18:45 +0200 [thread overview]
Message-ID: <20160507091845.GA6911@breakpoint.cc> (raw)
In-Reply-To: <CAPWQB7H0qdi2+rL92_O=-ku+FeqDSGEmn+d0wivk-1RSAsgeFw@mail.gmail.com>
Joe Stringer <joe@ovn.org> wrote:
> > If so, probably I can append this as comment to this function so we
> > don't forget. If we ever have .exit callbacks (I don't expect so), we
> > would need to wait for worker completion.
>
> Sounds reasonable to me.
>
> I see there's a bunch of other unregister locations like
> nf_nat_l3proto_clean(), nf_nat_l4proto_clean(), nf_unregister_hook()
> which might need similar treatment?
I think they are fine, hook entries are duplicated per netns so we
should not access data in a removed module.
However, we might be able to trigger the
WARN(1, "nf_unregister_net_hook: hook not found!\n");
part in nf_unregister_net_hook():
[ destroy netns -> destruction queued -> rmmod -> all hooks are
destroyed -> netns workq runs -> nf_unregister_net_hook gets called
-> hook already gone ]
For nf_nat_l3|4proto_clean I don't see a problem either, if netns
is gone all these conntracks will be zapped once the workqueue runs, even if
the iteration in those function did not see the netns anymore.
Cheers,
Florian
next prev parent reply other threads:[~2016-05-07 9:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 22:50 [PATCH net] netfilter: nf_conntrack: Use net_mutex for helper unregistration Joe Stringer
2016-05-06 11:03 ` Pablo Neira Ayuso
2016-05-06 19:38 ` Joe Stringer
2016-05-07 9:18 ` Florian Westphal [this message]
2016-05-17 4:38 ` Joe Stringer
2016-05-17 10:16 ` Pablo Neira Ayuso
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=20160507091845.GA6911@breakpoint.cc \
--to=fw@strlen.de \
--cc=joe@ovn.org \
--cc=netdev@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).