From: "Paul E. McKenney" <paulmck@kernel.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
Jozsef Kadlecsik <kadlec@netfilter.org>,
Florian Westphal <fw@strlen.de>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org
Subject: Re: [PATCH tip/core/rcu 8/9] net/netfilter: Replace rcu_swap_protected() with rcu_replace()
Date: Wed, 9 Oct 2019 08:36:59 -0700 [thread overview]
Message-ID: <20191009153659.GA30521@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20191008141611.usmxb5vzoxc36wqw@salvia>
On Tue, Oct 08, 2019 at 04:16:11PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Oct 02, 2019 at 06:43:09PM -0700, paulmck@kernel.org wrote:
> > From: "Paul E. McKenney" <paulmck@kernel.org>
> >
> > This commit replaces the use of rcu_swap_protected() with the more
> > intuitively appealing rcu_replace() as a step towards removing
> > rcu_swap_protected().
> >
> > Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/
> > Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> > Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
> > Cc: Florian Westphal <fw@strlen.de>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: <netfilter-devel@vger.kernel.org>
> > Cc: <coreteam@netfilter.org>
> > Cc: <netdev@vger.kernel.org>
>
> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Applied, thank you!
Thanx, Paul
> > ---
> > net/netfilter/nf_tables_api.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
> > index d481f9b..8499baf 100644
> > --- a/net/netfilter/nf_tables_api.c
> > +++ b/net/netfilter/nf_tables_api.c
> > @@ -1461,8 +1461,9 @@ static void nft_chain_stats_replace(struct nft_trans *trans)
> > if (!nft_trans_chain_stats(trans))
> > return;
> >
> > - rcu_swap_protected(chain->stats, nft_trans_chain_stats(trans),
> > - lockdep_commit_lock_is_held(trans->ctx.net));
> > + nft_trans_chain_stats(trans) =
> > + rcu_replace(chain->stats, nft_trans_chain_stats(trans),
> > + lockdep_commit_lock_is_held(trans->ctx.net));
> >
> > if (!nft_trans_chain_stats(trans))
> > static_branch_inc(&nft_counters_enabled);
> > --
> > 2.9.5
> >
next prev parent reply other threads:[~2019-10-09 15:37 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 1:41 [PATCH tip/core/rcu 0/9] Replace rcu_swap_protected() for v5.5 Paul E. McKenney
2019-10-03 1:43 ` [PATCH tip/core/rcu 1/9] rcu: Upgrade rcu_swap_protected() to rcu_replace() paulmck
2019-10-03 16:35 ` Mathieu Desnoyers
2019-10-03 16:52 ` Paul E. McKenney
2019-10-03 17:21 ` Mathieu Desnoyers
2019-10-03 19:09 ` Paul E. McKenney
2019-10-03 19:14 ` Mathieu Desnoyers
2019-10-03 1:43 ` [PATCH tip/core/rcu 2/9] x86/kvm/pmu: Replace rcu_swap_protected() with rcu_replace() paulmck
2019-10-03 10:14 ` Paolo Bonzini
2019-10-05 16:11 ` Paul E. McKenney
2019-10-03 1:43 ` [PATCH tip/core/rcu 3/9] drivers/gpu: " paulmck
2019-10-03 1:43 ` [PATCH tip/core/rcu 4/9] drivers/scsi: " paulmck
2019-10-04 2:09 ` Martin K. Petersen
2019-10-05 16:06 ` Paul E. McKenney
2019-10-10 2:36 ` Martin K. Petersen
2019-10-03 1:43 ` [PATCH tip/core/rcu 5/9] fs/afs: " paulmck
2019-10-03 1:43 ` [PATCH tip/core/rcu 6/9] bpf/cgroup: " paulmck
2019-10-03 17:21 ` Andrii Nakryiko
2019-10-03 20:58 ` Song Liu
2019-10-05 16:11 ` Paul E. McKenney
2019-10-03 1:43 ` [PATCH tip/core/rcu 7/9] net/core: " paulmck
2019-10-03 1:43 ` [PATCH tip/core/rcu 8/9] net/netfilter: " paulmck
2019-10-08 14:16 ` Pablo Neira Ayuso
2019-10-09 15:36 ` Paul E. McKenney [this message]
2019-10-03 1:43 ` [PATCH tip/core/rcu 9/9] net/sched: " paulmck
2019-10-03 8:38 ` [PATCH tip/core/rcu 5/9] fs/afs: " David Howells
2019-10-05 16:10 ` Paul E. McKenney
2019-10-03 8:39 ` [PATCH tip/core/rcu 1/9] rcu: Upgrade rcu_swap_protected() to rcu_replace() David Howells
2019-10-03 13:08 ` Steven Rostedt
2019-10-03 13:33 ` Paul E. McKenney
2019-10-03 13:41 ` Peter Zijlstra
2019-10-03 13:58 ` Paul E. McKenney
2019-10-03 14:01 ` Joel Fernandes
2019-10-03 16:31 ` Mathieu Desnoyers
2019-10-03 18:05 ` Peter Zijlstra
2019-10-22 19:11 ` [PATCH v2 tip/core/rcu 0/10] Replace rcu_swap_protected() for v5.5 Paul E. McKenney
2019-10-22 19:12 ` [PATCH tip/core/rcu 01/10] rcu: Upgrade rcu_swap_protected() to rcu_replace() paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 02/10] x86/kvm/pmu: Replace rcu_swap_protected() with rcu_replace() paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 03/10] drivers/gpu: " paulmck
2019-10-28 12:57 ` Joonas Lahtinen
2019-10-28 13:40 ` Paul E. McKenney
2019-10-22 19:12 ` [PATCH tip/core/rcu 04/10] drivers/scsi: " paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 05/10] fs/afs: " paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 06/10] bpf/cgroup: " paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 07/10] net/core: " paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 08/10] net/netfilter: " paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 09/10] net/sched: " paulmck
2019-10-22 19:12 ` [PATCH tip/core/rcu 10/10] security/safesetid: " paulmck
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=20191009153659.GA30521@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kadlec@netfilter.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=pablo@netfilter.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).