From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org, Zambo Marcell <marcell.zambo@gmail.com>
Subject: Re: [PATCH 1/1] netfilter: fix soft lockup when netlink adds new entries
Date: Thu, 23 Feb 2012 16:46:46 +0100 [thread overview]
Message-ID: <20120223154646.GA4790@1984> (raw)
In-Reply-To: <alpine.DEB.2.00.1202231334060.12151@blackhole.kfki.hu>
On Thu, Feb 23, 2012 at 01:43:06PM +0100, Jozsef Kadlecsik wrote:
> Hi Pablo,
>
> On Thu, 23 Feb 2012, Pablo Neira Ayuso wrote:
>
> > On Tue, Feb 21, 2012 at 04:06:59PM +0100, Jozsef Kadlecsik wrote:
> > > Or do I miss something else here?
> >
> > I just noticed one problem.
> >
> > With your approach, we may lose race if one packet inserts same conntrack
> > entry while we're adding one conntrack. Thus resulting in two conntracks
> > with the same tuples in the table.
>
> Yes, you're right, that race condition is possible.
>
> > One possible solution would be to check if it already exists before
> > adding it to the list, but this will add too many extra cycles for
> > each conntrack that is added via ctnetlink.
>
> Actually, netfilter for normal conntrack entries does the same in
> __nf_conntrack_confirm. So entries added via ctnetlink would not be
> penalized if the same checking were added to ctnetlink_create_conntrack
> in the locked region. Shall I send a patch over the previous one?
Yes, please.
next prev parent reply other threads:[~2012-02-23 15:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 13:53 [PATCH 0/1] netfilter: fix soft lockup when netlink adds new entries Jozsef Kadlecsik
2012-02-21 13:53 ` [PATCH 1/1] " Jozsef Kadlecsik
2012-02-21 14:52 ` Pablo Neira Ayuso
2012-02-21 15:06 ` Jozsef Kadlecsik
2012-02-21 15:20 ` Pablo Neira Ayuso
2012-02-23 10:12 ` Pablo Neira Ayuso
2012-02-23 12:43 ` Jozsef Kadlecsik
2012-02-23 15:46 ` Pablo Neira Ayuso [this message]
2012-02-23 20:44 ` Jozsef Kadlecsik
2012-02-24 1:24 ` Pablo Neira Ayuso
2012-02-24 6:44 ` Eric Dumazet
2012-02-24 10:01 ` Pablo Neira Ayuso
2012-02-24 10:11 ` Jozsef Kadlecsik
2012-02-24 11:36 ` Pablo Neira Ayuso
2012-02-24 8:06 ` Jozsef Kadlecsik
2012-02-24 9:59 ` Pablo Neira Ayuso
2012-02-24 10:09 ` Jozsef Kadlecsik
2012-02-24 10:45 ` Jozsef Kadlecsik
2012-02-24 11:18 ` Pablo Neira Ayuso
2012-02-24 11:33 ` Pablo Neira Ayuso
2012-02-24 17:05 ` Jozsef Kadlecsik
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=20120223154646.GA4790@1984 \
--to=pablo@netfilter.org \
--cc=kadlec@blackhole.kfki.hu \
--cc=marcell.zambo@gmail.com \
--cc=netfilter-devel@vger.kernel.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).