]> git.ipfire.org Git - thirdparty/linux.git/commit
netfilter: ipset: switch to rcu work
authorFlorian Westphal <fw@strlen.de>
Thu, 30 Jul 2026 18:38:53 +0000 (20:38 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 31 Jul 2026 13:58:08 +0000 (15:58 +0200)
commit7defddefa95b3699b05b23bf3ceea94d872509bb
tree23dcd3acabdbb5be875f2c9dcd2d2df6db2815d6
parentcdd97fae0e96fc0f78418b93ca864f98cd63e99a
netfilter: ipset: switch to rcu work

In the initial ipset rhashtable conversion RFC series syzbot reported
following splat:

BUG: sleeping function [..] at kernel/irq_work.c:289
in_atomic(): 1, [..]
 irq_work_sync.. kernel/irq_work.c:289
 rhashtable_free_and_destroy.. lib/rhashtable.c:1295
 hash_netport4_destroy.. net/netfilter/ipset/ip_set_hash_gen.h:420
 ip_set_destroy_set_rcu.. net/netfilter/ipset/ip_set_core.c:1169
 rcu_core.. kernel/rcu/tree.c:2897

This is because post-rhashtable-conversion hash implementation needs
to schedule in the destroy callback.  At this time this isn't allowed.

Replace existing call_rcu() based destruction with rcu_work api.

Also allows to undo split of set destruction and gc work cancelling in
a future patch.

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_core.c