Netfilter-Devel Archive on
 help / color / Atom feed
* [tip: core/rcu] net/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer()
@ 2019-10-31 11:54 tip-bot2 for Paul E. McKenney
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Paul E. McKenney @ 2019-10-31 11:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Linus Torvalds, Paul E. McKenney, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	netfilter-devel, coreteam, netdev, Ingo Molnar, Borislav Petkov,

The following commit has been merged into the core/rcu branch of tip:

Commit-ID:     b685b534bf1586a01b32280d1da39febaf270039
Author:        Paul E. McKenney <>
AuthorDate:    Mon, 23 Sep 2019 15:53:02 -07:00
Committer:     Paul E. McKenney <>
CommitterDate: Wed, 30 Oct 2019 08:45:38 -07:00

net/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer()

This commit replaces the use of rcu_swap_protected() with the more
intuitively appealing rcu_replace_pointer() as a step towards removing

Reported-by: Linus Torvalds <>
[ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ]
Signed-off-by: Paul E. McKenney <>
Acked-by: Pablo Neira Ayuso <>
Cc: Jozsef Kadlecsik <>
Cc: Florian Westphal <>
Cc: "David S. Miller" <>
Cc: <>
Cc: <>
Cc: <>
 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..3379974 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))
-	rcu_swap_protected(chain->stats, nft_trans_chain_stats(trans),
-			   lockdep_commit_lock_is_held(trans->;
+	nft_trans_chain_stats(trans) =
+		rcu_replace_pointer(chain->stats, nft_trans_chain_stats(trans),
+				    lockdep_commit_lock_is_held(trans->;
 	if (!nft_trans_chain_stats(trans))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 11:54 [tip: core/rcu] net/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer() tip-bot2 for Paul E. McKenney

Netfilter-Devel Archive on

Archives are clonable:
	git clone --mirror netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ \
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone