All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, avagin@parallels.com,
	fw@strlen.de, eric.dumazet@gmail.com
Subject: Re: [PATCH] netfilter: nf_conntrack: don't release a conntrack with non-zero refcnt
Date: Tue, 4 Feb 2014 00:29:25 +0100	[thread overview]
Message-ID: <20140203232925.GA3695@breakpoint.cc> (raw)
In-Reply-To: <1391465397-3856-1-git-send-email-pablo@netfilter.org>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
> index 4d1fb5d..356bef5 100644
> --- a/net/netfilter/nf_conntrack_core.c
> +++ b/net/netfilter/nf_conntrack_core.c
> @@ -448,7 +448,9 @@ nf_conntrack_hash_check_insert(struct nf_conn *ct)
>  			goto out;
>  
>  	add_timer(&ct->timeout);
> -	nf_conntrack_get(&ct->ct_general);
> +	smp_wmb();
> +	/* The caller holds a reference to this object */
> +	atomic_set(&ct->ct_general.use, 2);

What happens when the skb is dropped before confirmation?
How is skb_clone etc. solved (it increments refcnt of underlying
conntrack object?)

  reply	other threads:[~2014-02-03 23:29 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 [this message]
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
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=20140203232925.GA3695@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=avagin@parallels.com \
    --cc=eric.dumazet@gmail.com \
    --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 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.