From: Alex Bligh <alex@alex.org.uk>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
coreteam@netfilter.org, linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org,
Linux Containers <containers@lists.osdl.org>,
Alex Bligh <alex@alex.org.uk>
Subject: Re: [PATCH] Fix repeatable Oops on container destroy with conntrack
Date: Mon, 12 Sep 2011 20:06:25 +0100 [thread overview]
Message-ID: <87A32B21CA99D62CE1AB7A4B@Ximines.local> (raw)
In-Reply-To: <20110912183357.GC3641@1984>
Pablo,
--On 12 September 2011 20:33:57 +0200 Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Yes, this is what Alexey was pointing out in the previous email and
> why he suggested to move it to nfnetlink_has_listeners (to cover the
> expectation case).
>
> But you're right, we cannot move it to nfnetlink_has_listeners because
> of the item->report case. Please, include the expectation part and
> resend the patch.
Thanks - see below
--
Alex Bligh
Signed-off-by: Alex Bligh <alex@alex.org.uk>
---
net/netfilter/nf_conntrack_netlink.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 482e90c..f44d571 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -570,6 +570,11 @@ ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item)
return 0;
net = nf_ct_net(ct);
+
+ /* container deinit, netlink may have died before death_by_timeout */
+ if (!net->nfnl)
+ return 0;
+
if (!item->report && !nfnetlink_has_listeners(net, group))
return 0;
@@ -1723,6 +1728,10 @@ ctnetlink_expect_event(unsigned int events, struct nf_exp_event *item)
} else
return 0;
+ /* container deinit, netlink may have died before death_by_timeout */
+ if (!net->nfnl)
+ return 0;
+
if (!item->report && !nfnetlink_has_listeners(net, group))
return 0;
--
1.7.5.4
next prev parent reply other threads:[~2011-09-12 19:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-10 18:48 Alex Bligh
2011-09-12 7:25 ` Alexey Dobriyan
2011-09-12 9:37 ` Pablo Neira Ayuso
2011-09-12 10:32 ` Alex Bligh
2011-09-12 18:33 ` Pablo Neira Ayuso
2011-09-12 19:06 ` Alex Bligh [this message]
2011-09-13 20:44 ` Alex Bligh
2011-09-14 1:35 ` Pablo Neira Ayuso
2011-09-14 8:01 ` Alex Bligh
2011-09-28 21:08 ` Pablo Neira Ayuso
2011-09-30 15:54 ` Alex Bligh
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=87A32B21CA99D62CE1AB7A4B@Ximines.local \
--to=alex@alex.org.uk \
--cc=adobriyan@gmail.com \
--cc=containers@lists.linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=coreteam@netfilter.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@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
all inboxes | Powered by JetHome®