Re: [PATCH RFC nf-next 11/12] netfilter: ipset: remove last region lock usage
Jozsef Kadlecsik <[email protected]> Thu, 16 Jul 2026 16:17:19 +0200 (CEST)
| Newsgroups | gmane.comp.security.firewalls.netfilter.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 16 Jul 2026, Florian Westphal wrote: > Jozsef Kadlecsik <[email protected]> wrote: >>> Move lock responsibility into kadt/uadt/flush callbacks and remove the >>> last .region_lock users. >> >> Why move the set->lock locking into the callbacks? As now all types use it, >> it'd be easier to keep it in core and not replicate it in all callbacks. > > Ideally the hash types would never use it (or only for comment > extension) for delete/add. The comment string is kept in struct ip_set_comment_rcu. The whole mess about the extension was due to resize copying the pointer of the wrapper struct ip_set_comment while ongoing gc could happen. However resize is gone now. Re-add from userspace can change the comment string but it can nicely be handled with rcu. So as far as I see ext_size remains to be solved and the hash types could remain lockless. Best regards, Jozsef