From: Jon Masters <jonathan@jonmasters.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
netfilter-devel <netfilter-devel@vger.kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH] netfilter: per netns nf_conntrack_cachep
Date: Tue, 02 Feb 2010 13:34:36 -0500 [thread overview]
Message-ID: <1265135676.2861.196.camel@tonnant> (raw)
In-Reply-To: <1265134598.2861.191.camel@tonnant>
On Tue, 2010-02-02 at 13:16 -0500, Jon Masters wrote:
> On Tue, 2010-02-02 at 19:58 +0200, Alexey Dobriyan wrote:
>
> > Yes, moving to init_net-only function is fine.
>
> So moving the "setup up fake conntrack" bits to init_init_net from
> init_net still results in the panic, which means that the use count
> really is dropping to zero and we really are trying to free it when
> using multiple namespaces. Per ns is probably an easier way to go.
>
> Just for kicks, I'll have it error out on attempting to free to see if I
> can get this box to stay up for a while.
Confirmed. It boots and the hashsize is not inadvertedly corrupted if I
do the following:
void nf_conntrack_destroy(struct nf_conntrack *nfct)
{
void (*destroy)(struct nf_conntrack *);
if ((struct nf_conn *)nfct == &nf_conntrack_untracked) {
printk("JCM: nf_conntrack_destroy: trying to destroy
nf_conntrack_untracked! CONTINUING...\n");
//panic("JCM: nf_conntrack_destroy: trying to destroy
nf_conntrack_untracked!\n");
return; /* refuse to free nf_conntrack_untracked */
}
rcu_read_lock();
destroy = rcu_dereference(nf_ct_destroy);
BUG_ON(destroy == NULL);
destroy(nfct);
rcu_read_unlock();
}
EXPORT_SYMBOL(nf_conntrack_destroy);
Clearly that's just a hack (though catching the specific attempt to free
the untracked conntrack sounds like a very good idea in general). I will
leave this running for a while, but so far no problems:
[jcm@perihelion jcm_26]$ dmesg|grep JCM
[ 29.952717] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 30.207091] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 30.403248] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 31.403319] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 32.977106] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 33.347100] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 33.966092] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 34.967111] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 35.404323] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 35.911430] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 35.912442] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 38.967061] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 39.403342] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 41.288392] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 42.966063] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 44.036451] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 95.621174] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 95.673061] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 95.741180] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 96.273429] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 96.741296] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 97.246108] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 98.246486] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 100.747170] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 102.252067] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 104.747066] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 105.762433] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 106.252084] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 147.260998] JCM: nf_conntrack_destroy: trying to destroy
nf_conntrack_untracked! CONTINUING...
[ 155.485160] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 156.403661] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 157.402928] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 161.402477] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 163.270622] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 163.277368] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 167.718677] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 176.901877] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 182.554024] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 182.616693] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 183.616932] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 187.617026] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 188.362002] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 191.617001] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 193.574899] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 197.455338] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 214.163491] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 214.311528] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 215.311577] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 219.317496] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 220.693493] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 223.317095] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 240.326198] JCM: nf_conntrack_destroy: trying to destroy
nf_conntrack_untracked! CONTINUING...
[ 252.481116] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 252.881087] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 253.881251] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 257.922816] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 258.882989] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 261.413093] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 261.921943] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
[ 266.350983] JCM: icmpv6_error: attaching to nf_conntrack_untracked.
So, over to you :)
Jon.
next prev parent reply other threads:[~2010-02-02 18:34 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-30 1:10 debug: nt_conntrack and KVM crash Jon Masters
2010-01-30 1:57 ` Jon Masters
2010-01-30 1:59 ` Jon Masters
2010-01-30 6:58 ` Eric Dumazet
2010-01-30 7:36 ` Jon Masters
2010-01-30 7:40 ` Jon Masters
2010-01-30 8:33 ` Eric Dumazet
2010-01-30 10:03 ` Jon Masters
2010-02-01 9:32 ` Jon Masters
2010-02-01 9:36 ` Alexey Dobriyan
2010-02-01 10:12 ` Eric Dumazet
2010-02-01 10:25 ` Alexey Dobriyan
2010-02-01 10:38 ` Jon Masters
2010-02-01 11:23 ` Eric Dumazet
2010-02-01 14:48 ` Alexey Dobriyan
2010-02-01 14:57 ` Eric Dumazet
2010-02-01 14:52 ` [PATCH] netfilter: per netns nf_conntrack_cachep Eric Dumazet
2010-02-01 14:58 ` Alexey Dobriyan
2010-02-01 15:02 ` Eric Dumazet
2010-02-02 11:04 ` Jon Masters
2010-02-02 11:35 ` Jon Masters
2010-02-02 16:46 ` Jon Masters
2010-02-02 16:48 ` Patrick McHardy
2010-02-02 17:07 ` Jon Masters
2010-02-02 17:58 ` Alexey Dobriyan
2010-02-02 18:16 ` Jon Masters
2010-02-02 18:34 ` Jon Masters [this message]
2010-02-02 18:36 ` Patrick McHardy
2010-02-02 18:39 ` Jon Masters
2010-02-02 18:42 ` Jon Masters
2010-02-03 12:10 ` Patrick McHardy
2010-02-03 18:38 ` Jon Masters
2010-02-03 19:09 ` Alexey Dobriyan
2010-02-03 19:43 ` Jon Masters
2010-02-03 19:46 ` Jon Masters
2010-02-03 19:53 ` Alexey Dobriyan
2010-02-03 20:04 ` Jon Masters
2010-02-03 19:51 ` Alexey Dobriyan
2010-02-03 19:53 ` Jon Masters
2010-02-03 20:01 ` Alexey Dobriyan
2010-02-04 12:25 ` Patrick McHardy
2010-02-04 12:27 ` Alexey Dobriyan
2010-02-04 12:30 ` Patrick McHardy
2010-02-04 12:35 ` Alexey Dobriyan
2010-02-04 13:04 ` Patrick McHardy
2010-02-04 13:18 ` Jon Masters
2010-02-04 13:37 ` Patrick McHardy
2010-02-04 13:42 ` Jon Masters
2010-02-03 20:21 ` Jon Masters
2010-02-04 12:24 ` Patrick McHardy
2010-02-02 16:58 ` PROBLEM with summary: " Jon Masters
2010-02-02 17:04 ` Patrick McHardy
2010-02-02 17:16 ` Eric Dumazet
2010-02-02 17:23 ` Jon Masters
2010-02-02 4:36 ` Jon Masters
2010-02-02 7:02 ` Jon Masters
2010-02-02 10:47 ` Jon Masters
2010-02-04 14:00 ` Patrick McHardy
2010-02-01 10:35 ` debug: nt_conntrack and KVM crash Jon Masters
2010-02-01 10:44 ` Alexey Dobriyan
2010-02-01 10:47 ` Alexey Dobriyan
2010-02-01 10:49 ` Alexey Dobriyan
2010-02-01 10:53 ` Jon Masters
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=1265135676.2861.196.camel@tonnant \
--to=jonathan@jonmasters.org \
--cc=adobriyan@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
/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).