netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: flowtable: prefer refcount_inc
Date: Thu, 21 Jul 2022 00:57:25 +0200	[thread overview]
Message-ID: <YtiIVUkTXsRQK95u@salvia> (raw)
In-Reply-To: <20220707193056.29833-1-fw@strlen.de>

On Thu, Jul 07, 2022 at 09:30:56PM +0200, Florian Westphal wrote:
> With refcount_inc_not_zero, we'd also need a smp_rmb or similar,
> followed by a test of the CONFIRMED bit.
> 
> However, the ct pointer is taken from skb->_nfct, its refcount must
> not be 0 (else, we'd already have a use-after-free bug).
> 
> Use refcount_inc() instead to clarify the ct refcount is expected to
> be at least 1.

Applied, thanks

      reply	other threads:[~2022-07-20 22:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 19:30 [PATCH nf-next] netfilter: flowtable: prefer refcount_inc Florian Westphal
2022-07-20 22:57 ` Pablo Neira Ayuso [this message]

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=YtiIVUkTXsRQK95u@salvia \
    --to=pablo@netfilter.org \
    --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 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).