mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-02 23:54:33 +01:00
netfilter: ipset: Add list flush to cancel_gc
Flushing list in cancel_gc drops references to other lists right away,
without waiting for RCU to destroy list. Fixes race when referenced
ipsets can't be destroyed while referring list is scheduled for destroy.
Fixes: 97f7cf1cd8 ("netfilter: ipset: fix performance regression in swap operation")
Signed-off-by: Alexander Maltsev <[email protected]>
Acked-by: Jozsef Kadlecsik <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
This commit is contained in:
1 parent
dc21c6cc3d
commit
c1193d9bbb
1 file changed
+3
@@ -549,6 +549,9 @@ list_set_cancel_gc(struct ip_set *set)
|
||||
|
||||
if (SET_WITH_TIMEOUT(set))
|
||||
timer_shutdown_sync(&map->gc);
|
||||
|
||||
/* Flush list to drop references to other ipsets */
|
||||
list_set_flush(set);
|
||||
}
|
||||
|
||||
static const struct ip_set_type_variant set_variant = {
|
||||
|
||||
Reference in new issue
Block a user