]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
netfilter: ipset: make sure gc is properly stopped
authorJozsef Kadlecsik <kadlec@netfilter.org>
Wed, 17 Jun 2026 08:41:26 +0000 (10:41 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 20 Jun 2026 22:18:26 +0000 (00:18 +0200)
Sashiko noticed that when destroying a set,
cancel_delayed_work_sync() was called while gc
calls queue_delayed_work() unconditionally which
can lead not to properly shutting down the gc.

Fixes: f66ee0410b1c ("netfilter: ipset: Fix "INFO: rcu detected stall in hash_xxx" reports")
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_hash_gen.h

index 00c27b95207f79967da8f1c700708765546a6a81..dedf59b661ddf37d3a93ef5a049ad75b7413f7d8 100644 (file)
@@ -606,7 +606,7 @@ mtype_cancel_gc(struct ip_set *set)
        struct htype *h = set->data;
 
        if (SET_WITH_TIMEOUT(set))
-               cancel_delayed_work_sync(&h->gc.dwork);
+               disable_delayed_work_sync(&h->gc.dwork);
 }
 
 static int