[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221109170707.GA18993@breakpoint.cc>
Date: Wed, 9 Nov 2022 18:07:07 +0100
From: Florian Westphal <fw@...len.de>
To: Daniel Xu <dxu@...uu.xyz>
Cc: pablo@...filter.org, fw@...len.de, kadlec@...filter.org,
netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfilter: ctmark: Fix data-races around ctmark
Daniel Xu <dxu@...uu.xyz> wrote:
> index f97bda06d2a9..669561fb73bd 100644
> --- a/net/netfilter/nf_conntrack_core.c
> +++ b/net/netfilter/nf_conntrack_core.c
> @@ -1781,7 +1781,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
> }
>
> #ifdef CONFIG_NF_CONNTRACK_MARK
> - ct->mark = exp->master->mark;
> + WRITE_ONCE(ct->mark, READ_ONCE(exp->master->mark));
*ct is owned by the current cpu at this point, so WRITE_ONCE is not
needed.
Rest looks fine.
Powered by blists - more mailing lists