From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netfilter-devel@vger.kernel.org, avagin@parallels.com, fw@strlen.de
Subject: Re: [PATCH] netfilter: nf_conntrack: don't release a conntrack with non-zero refcnt
Date: Thu, 6 Feb 2014 00:00:05 +0100 [thread overview]
Message-ID: <20140205230005.GA3806@localhost> (raw)
In-Reply-To: <1391474362.28432.112.camel@edumazet-glaptop2.roam.corp.google.com>
On Mon, Feb 03, 2014 at 04:39:22PM -0800, Eric Dumazet wrote:
> On Mon, 2014-02-03 at 23:09 +0100, Pablo Neira Ayuso wrote:
> > With this patch, the conntrack refcount is initially set to zero and
> > it is bumped once it is added to any of the list, so we fulfill
> > Eric's golden rule which is that all released objects always have a
> > refcount that equals zero.
> >
> > Andrey Vagin reports that nf_conntrack_free can't be called for a
> > conntrack with non-zero ref-counter, because it can race with
> > nf_conntrack_find_get().
> >
> > A conntrack slab is created with SLAB_DESTROY_BY_RCU. Non-zero
> > ref-counter says that this conntrack is used. So when we release
> > a conntrack with non-zero counter, we break this assumption.
> ...
> > Cc: Eric Dumazet <eric.dumazet@gmail.com>
> > Cc: Florian Westphal <fw@strlen.de>
> > Cc: Andrew Vagin <avagin@parallels.com>
> > Reported-by: Andrew Vagin <avagin@parallels.com>
> > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> > ---
>
> SGTM !
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
Applied, thanks everyone!
next prev parent reply other threads:[~2014-02-05 23:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 22:09 [PATCH] netfilter: nf_conntrack: don't release a conntrack with non-zero refcnt Pablo Neira Ayuso
2014-02-03 23:29 ` Florian Westphal
2014-02-04 10:21 ` Pablo Neira Ayuso
2014-02-04 12:46 ` Florian Westphal
2014-02-04 13:16 ` Pablo Neira Ayuso
2014-02-04 13:27 ` Florian Westphal
2014-02-04 0:39 ` Eric Dumazet
2014-02-05 23:00 ` Pablo Neira Ayuso [this message]
2014-02-04 13:53 ` Andrew Vagin
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=20140205230005.GA3806@localhost \
--to=pablo@netfilter.org \
--cc=avagin@parallels.com \
--cc=eric.dumazet@gmail.com \
--cc=fw@strlen.de \
--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 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.