All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Daniel Xu <dxu@dxuuu.xyz>
Cc: fw@strlen.de, kadlec@netfilter.org,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] netfilter: ctmark: Fix data-races around ctmark
Date: Fri, 18 Nov 2022 11:29:25 +0100	[thread overview]
Message-ID: <Y3dehd619g/2vlWv@salvia> (raw)
In-Reply-To: <7220acad9aaefa2ab891d1bcbbc9d5cc4a8f0a7e.1668022522.git.dxu@dxuuu.xyz>

On Wed, Nov 09, 2022 at 12:39:07PM -0700, Daniel Xu wrote:
> nf_conn:mark can be read from and written to in parallel. Use
> READ_ONCE()/WRITE_ONCE() for reads and writes to prevent unwanted
> compiler optimizations.
> 
> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> ---
> Changes since v1:
> - Remove WRITE_ONCE() from init path
> 
>  net/core/flow_dissector.c               |  2 +-
>  net/ipv4/netfilter/ipt_CLUSTERIP.c      |  4 ++--
>  net/netfilter/nf_conntrack_core.c       |  2 +-
>  net/netfilter/nf_conntrack_netlink.c    | 24 ++++++++++++++----------
>  net/netfilter/nf_conntrack_standalone.c |  2 +-
>  net/netfilter/nft_ct.c                  |  6 +++---
>  net/netfilter/xt_connmark.c             | 18 ++++++++++--------
>  net/openvswitch/conntrack.c             |  8 ++++----
>  net/sched/act_connmark.c                |  4 ++--
>  net/sched/act_ct.c                      |  8 ++++----
>  net/sched/act_ctinfo.c                  |  6 +++---
>  11 files changed, 45 insertions(+), 39 deletions(-)

I am going to place this in nf.git, it's a bit late but it's
relatively small and I think the sooner the better to have this fix.

      reply	other threads:[~2022-11-18 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 19:39 [PATCH v2] netfilter: ctmark: Fix data-races around ctmark Daniel Xu
2022-11-18 10:29 ` 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=Y3dehd619g/2vlWv@salvia \
    --to=pablo@netfilter.org \
    --cc=dxu@dxuuu.xyz \
    --cc=fw@strlen.de \
    --cc=kadlec@netfilter.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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.