Subject: Re: [PATCH] netfilter: ctmark: Fix data-races around ctmark

From: Florian Westphal <[email-masked]>
Date: Wed, 9 Nov 2022 18:07:07 +0100

Daniel Xu <[email-masked]> 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.