]> git.ipfire.org Git - thirdparty/linux.git/commit
netfilter: ipset: switch ext_size to atomic64_t
authorJozsef Kadlecsik <kadlec@netfilter.org>
Thu, 30 Jul 2026 18:38:50 +0000 (20:38 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 31 Jul 2026 13:57:38 +0000 (15:57 +0200)
commit712a6f545c359b427daa9a5a782e30d2f8331e25
tree76f1eaf926e7357bcb6fcd84b7cdb2ea047d0e93
parent8e5fd2a55e2468f6225ef5af01ae58cdbcbae8cf
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>
include/linux/netfilter/ipset/ip_set.h
net/netfilter/ipset/ip_set_bitmap_gen.h
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_hash_gen.h
net/netfilter/ipset/ip_set_list_set.c