summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@netfilter.org>2026-07-30 20:38:50 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2026-07-31 15:57:38 +0200
commit712a6f545c359b427daa9a5a782e30d2f8331e25 (patch)
tree76f1eaf926e7357bcb6fcd84b7cdb2ea047d0e93 /include/linux
parent8e5fd2a55e2468f6225ef5af01ae58cdbcbae8cf (diff)
netfilter: ipset: switch ext_size to atomic64_t
The hash types do not acquire set->lock, they use 'region locking' where only part of the hash table is locked. Parallel inserts and deletes are possible and CPUs can race on ->ext_size update. Switch to atomic64_t. This leaves another bug unresolved: there still can be a race on comment extension re-init. This will be handled in a later commit when converting to rhashtable backend. Fixes: f66ee0410b1c ("netfilter: ipset: Fix "INFO: rcu detected stall in hash_xxx" reports") Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netfilter/ipset/ip_set.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h
index b98331572ad2..cadae9b2578f 100644
--- a/include/linux/netfilter/ipset/ip_set.h
+++ b/include/linux/netfilter/ipset/ip_set.h
@@ -273,7 +273,7 @@ struct ip_set {
/* Number of elements (vs timeout) */
u32 elements;
/* Size of the dynamic extensions (vs timeout) */
- size_t ext_size;
+ atomic64_t ext_size;
/* Element data size */
size_t dsize;
/* Offsets to extensions in elements */