netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next,v2 1/5] netfilter: nf_tables: remove rcu read-size lock
@ 2021-12-17 11:38 Pablo Neira Ayuso
  2021-12-17 11:38 ` [PATCH nf-next,v2 2/5] netfilter: nft_payload: WARN_ON_ONCE instead of BUG Pablo Neira Ayuso
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2021-12-17 11:38 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev, kuba

Chain stats are updated from the Netfilter hook path which already run
under rcu read-size lock section.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
v2: no changes

 net/netfilter/nf_tables_core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c
index adc348056076..41c7509955e6 100644
--- a/net/netfilter/nf_tables_core.c
+++ b/net/netfilter/nf_tables_core.c
@@ -110,7 +110,6 @@ static noinline void nft_update_chain_stats(const struct nft_chain *chain,
 
 	base_chain = nft_base_chain(chain);
 
-	rcu_read_lock();
 	pstats = READ_ONCE(base_chain->stats);
 	if (pstats) {
 		local_bh_disable();
@@ -121,7 +120,6 @@ static noinline void nft_update_chain_stats(const struct nft_chain *chain,
 		u64_stats_update_end(&stats->syncp);
 		local_bh_enable();
 	}
-	rcu_read_unlock();
 }
 
 struct nft_jumpstack {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-12-17 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-17 11:38 [PATCH nf-next,v2 1/5] netfilter: nf_tables: remove rcu read-size lock Pablo Neira Ayuso
2021-12-17 11:38 ` [PATCH nf-next,v2 2/5] netfilter: nft_payload: WARN_ON_ONCE instead of BUG Pablo Neira Ayuso
2021-12-17 11:38 ` [PATCH nf-next,v2 3/5] netfilter: nf_tables: consolidate rule verdict trace call Pablo Neira Ayuso
2021-12-17 11:38 ` [PATCH nf-next,v2 4/5] netfilter: nf_tables: replace WARN_ON by WARN_ON_ONCE for unknown verdicts Pablo Neira Ayuso
2021-12-17 11:38 ` [PATCH nf-next,v2 5/5] netfilter: nf_tables: make counter support built-in Pablo Neira Ayuso
2021-12-17 19:22   ` kernel test robot
2021-12-17 20:43   ` kernel test robot

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).